Skip to content

Commit 376f9f3

Browse files
committed
fix: keep sync snackbar anchored correctly
1 parent 51ab6d6 commit 376f9f3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,7 @@ open class DeckPicker :
11241124
Timber.i("DeckPicker:: SearchItem opened")
11251125
// Hide the floating action button if it is visible
11261126
floatingActionMenu.hideFloatingActionButton()
1127+
activeSnackBar?.anchorView = null
11271128
return true
11281129
}
11291130

@@ -1132,6 +1133,7 @@ open class DeckPicker :
11321133
Timber.i("DeckPicker:: SearchItem closed")
11331134
// Show the floating action button if it is hidden
11341135
floatingActionMenu.showFloatingActionButton()
1136+
activeSnackBar?.anchorView = floatingActionButtonBinding.fabMain
11351137
return true
11361138
}
11371139
},
@@ -1245,6 +1247,7 @@ open class DeckPicker :
12451247
}
12461248
R.id.action_sync -> {
12471249
Timber.i("DeckPicker:: Sync button pressed")
1250+
toolbarSearchItem?.collapseActionView()
12481251
val actionProvider = MenuItemCompat.getActionProvider(item) as? SyncActionProvider
12491252
if (actionProvider?.isProgressShown == true) {
12501253
launchCatchingTask {

0 commit comments

Comments
 (0)