ankidroid / ankidroid/Anki-Android

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

Abierto
#17,663 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Keep Open Priority-Low
Lenguaje dominante
Kotlin
Estrellas
11.8k
Forks
2.9k
Merge medio
2 d 3 h
PR fusionados (30 d)
171

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.