From 50832f9816ae10896957b4a5756be473b550877a Mon Sep 17 00:00:00 2001 From: SanjaySargam Date: Mon, 27 May 2024 15:06:17 +0530 Subject: [PATCH] hide fragment when collection is empty --- AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt b/AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt index c53de86f7c49..d42b9412b4aa 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt @@ -2059,7 +2059,8 @@ open class DeckPicker : hideProgressBar() // Make sure the fragment is visible if (fragmented) { - studyoptionsFrame!!.visibility = View.VISIBLE + invalidateOptionsMenu() + studyoptionsFrame!!.visibility = if (collectionIsEmpty) View.GONE else View.VISIBLE } dueTree = result launchCatchingTask { renderPage(collectionIsEmpty) }