ankidroid / ankidroid/Anki-Android

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

Open
#17,663 2 comments 0 reactions 0 assignees View on GitHub
Keep Open Priority-Low
Dominant language
Kotlin
Stars
11.8k
Forks
2.9k
Avg merge
2d 3h
Merged PRs (30d)
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.