0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 12:02:16 +02:00

Merged 'f607f67' from hotfix-2.5.3: Don't go to study options screen when deck empty or no cards to review

This commit is contained in:
Timothy Rae 2015-12-14 17:57:49 +09:00
commit aec168a15f

View File

@ -1738,12 +1738,15 @@ public class DeckPicker extends NavigationDrawerActivity implements
Sched.DeckDueTreeNode deckDueTreeNode = mDeckListAdapter.getDeckList().get(pos);
int[] studyOptionsCounts = getCol().getSched().counts();
// Figure out what action to take
if (mFragmented || dontSkipStudyOptions) {
// Go to StudyOptions screen when using filtered decks so that it's clearer to the user that it's different
openStudyOptions(false);
} else if (deckDueTreeNode.newCount + deckDueTreeNode.lrnCount + deckDueTreeNode.revCount > 0) {
// If normal deck and there are cards to study then jump straight to the reviewer
openReviewer();
if (deckDueTreeNode.newCount + deckDueTreeNode.lrnCount + deckDueTreeNode.revCount > 0) {
// If there are cards to study then either go to Reviewer or StudyOptions
if (mFragmented || dontSkipStudyOptions) {
// Go to StudyOptions screen when tablet or deck counts area was clicked
openStudyOptions(false);
} else {
// Otherwise jump straight to the reviewer
openReviewer();
}
} else if (studyOptionsCounts[0] + studyOptionsCounts[1] + studyOptionsCounts[2] > 0) {
// If there are cards due that can't be studied yet (due to the learn ahead limit) then go to study options
openStudyOptions(false);