ankidroid / ankidroid/Anki-Android

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

Offen
#17,663 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Keep Open Priority-Low
Vorherrschende Sprache
Kotlin
Sterne
11.8k
Forks
2.9k
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
171

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.