diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt b/AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt index 454e3d418252..b737375019d1 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt @@ -1038,6 +1038,15 @@ open class DeckPicker : } } + private suspend fun updateUndoMenuState() { + withOpenColOrNull { + optionsMenuState = optionsMenuState?.copy( + undoLabel = undoLabel(), + undoAvailable = undoAvailable() + ) + } + } + private fun updateSearchVisibilityFromState(menu: Menu) { optionsMenuState?.run { menu.findItem(R.id.deck_picker_action_filter).isVisible = searchIcon @@ -2132,7 +2141,7 @@ open class DeckPicker : } onDecksLoaded(deckDueTree, collectionHasNoCards) - updateMenuState() + updateUndoMenuState() } } }