Skip to content

Commit e953b6d

Browse files
committed
fix: prevent timed sheets dismissing gift sheet
1 parent d8f052d commit e953b6d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,14 @@ class AppViewModel @Inject constructor(
255255
viewModelScope.launch {
256256
timedSheetManager.currentSheet.collect { sheetType ->
257257
if (sheetType != null) {
258-
showSheet(Sheet.TimedSheet(sheetType))
258+
val currentSheet = _currentSheet.value
259+
val isHighPrioritySheetShowing = currentSheet is Sheet.Gift ||
260+
currentSheet is Sheet.Send ||
261+
currentSheet is Sheet.LnurlAuth ||
262+
currentSheet is Sheet.Pin
263+
if (!isHighPrioritySheetShowing) {
264+
showSheet(Sheet.TimedSheet(sheetType))
265+
}
259266
} else {
260267
// Clear the timed sheet when manager sets it to null
261268
_currentSheet.update { current ->

0 commit comments

Comments
 (0)