ankidroid / ankidroid/Anki-Android

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

Ouverte
#17,663 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Keep Open Priority-Low
Langage dominant
Kotlin
Étoiles
11.8k
Forks
2.9k
Merge moyen
2 j 3 h
PR mergées (30 j)
171

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.