Fix snack for updating library being behind the nav bar sometimes

This commit is contained in:
Jays2Kings 2021-05-09 13:52:11 -04:00
parent 5927ca6976
commit 8cadb283f8

View File

@ -331,7 +331,12 @@ class RecentsController(bundle: Bundle? = null) :
if (!LibraryUpdateService.isRunning()) {
snack?.dismiss()
snack = view.snack(R.string.updating_library) {
anchorView = binding.downloadBottomSheet.root
anchorView =
if (binding.downloadBottomSheet.root.sheetBehavior.isCollapsed()) {
binding.downloadBottomSheet.root
} else {
activityBinding?.bottomNav ?: binding.downloadBottomSheet.root
}
setAction(R.string.cancel) {
LibraryUpdateService.stop(context)
Handler().post {