File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
app/src/main/java/to/bitkit/utils/timedsheets Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -43,13 +43,15 @@ class TimedSheetManager(private val scope: CoroutineScope) {
4343 }
4444
4545 fun dismissCurrentSheet (skipQueue : Boolean = false) {
46+ if (currentTimedSheet == null ) return
47+
4648 scope.launch {
4749 currentTimedSheet?.onDismissed()
50+ _currentSheet .value = null
51+ currentTimedSheet = null
4852
4953 if (skipQueue) {
5054 Logger .debug(" Clearing timed sheet queue" , context = TAG )
51- _currentSheet .value = null
52- currentTimedSheet = null
5355 } else {
5456 delay(CHECK_DELAY_MILLIS )
5557 checkAndShowNextSheet()
@@ -58,6 +60,7 @@ class TimedSheetManager(private val scope: CoroutineScope) {
5860 }
5961
6062 private suspend fun checkAndShowNextSheet () {
63+ Logger .debug(" Queued sheets: ${registeredSheets.map { it.type.name }} " )
6164 for (sheet in registeredSheets.toList()) {
6265 if (sheet.shouldShow()) {
6366 Logger .debug(
You can’t perform that action at this time.
0 commit comments