Skip to content

Commit 3da1cab

Browse files
lukstbitcriticalAY
authored andcommitted
Fix FAB visibility after SearchView dismissal on deck deletion
Fixes bug in DeckPicker: open toolbar SearchView -> FAB is hidden -> long click deck -> delete deck -> Info SnackBar appears, SearchView is closed, FAB is still missing Deleting the deck would refresh the menu so the SearchView gets rebuilt and its listeners(which handle the FAB) would not get triggered. The fix sets the the FAB as visible when the delete deck handler is hit, just before the SnackBar is requested.
1 parent 22dafd8 commit 3da1cab

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ open class DeckPicker :
610610
@Suppress("UNUSED_PARAMETER")
611611
private fun setupFlows() {
612612
fun onDeckDeleted(result: DeckDeletionResult) {
613+
floatingActionButtonBinding.fabMain.isVisible = true
613614
showSnackbar(result.toHumanReadableString(), Snackbar.LENGTH_SHORT) {
614615
setAction(R.string.undo) { undo() }
615616
}

0 commit comments

Comments
 (0)