mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Merge pull request #3368 from Bnyro/master
Fix crash when bottom sheet is being dismissed
This commit is contained in:
commit
8ed5a9484f
@ -38,10 +38,12 @@ open class BaseBottomSheet : ExpandedBottomSheet() {
|
|||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
dialog?.hide()
|
dialog?.hide()
|
||||||
listener?.invoke(index)
|
listener?.invoke(index)
|
||||||
|
runCatching {
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun setSimpleItems(titles: List<String>, listener: (suspend (index: Int) -> Unit)?) =
|
fun setSimpleItems(titles: List<String>, listener: (suspend (index: Int) -> Unit)?) =
|
||||||
setItems(titles.map { BottomSheetItem(it) }, listener)
|
setItems(titles.map { BottomSheetItem(it) }, listener)
|
||||||
|
Loading…
Reference in New Issue
Block a user