ankidroid / ankidroid/Anki-Android

Shortcuts/widget for empty decks should behave as the deck picker

Aperta
#17,663 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Keep Open Priority-Low
Lingua principale
Kotlin
Stelle
11.8k
Fork
2.9k
Merge medio
2g 3h
PR unite (30g)
171

Descrizione

This issue is not ready to be tackled before there is a consensus on what is the expected behavior.

How to reproduce:
* Have a deck A, which has cards but not to be seen today
* create a shortcut or a widget for deck A
* tap on the shortcut or widget to open deck A

Actual result:
* with the shortcut, ankidroid opens and close automatically
* with the widget, the deck options open. When we go back, ankidroid closes

Expected result:
* I believe that we want the behavior to be similar to what we have when we tap in the deck picker on the deck A.

The issue is that it's not exactly clear. It means, at least:
* showing Congratulations!you have finished this deck for now. The CongratsPage

The difficulty is that, right now, the function [`onReviwesCompleted`](https://github.com/ankidroid/Anki-Android/blob/a1badcf66b7639bf7993b7aa20f7f15882e1324c/AnkiDroid/src/main/java/com/ichi2/anki/pages/CongratsPage.kt#L184) requires a FragmentActivity, and the IntentHandler is an Activity but not a FragmentActivity

After a few times of showing this screen, if there are no card to unbury, I think we should directly open those "custom study", on top of the congratulation. Because we wouldn't want the user to have to do two taps instead of one, and there is nothing else to do in this screen.

The question now is, what should we do when we go back from this screen? I opened #17664 to discuss it because the question is complex enough by itself.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.