File tree Expand file tree Collapse file tree 4 files changed +8
-14
lines changed
test/java/to/bitkit/utils/timedsheets Expand file tree Collapse file tree 4 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -745,7 +745,7 @@ private fun EntryProviderScope<NavKey>.sheetFlowEntries(
745745 }
746746 BackgroundPaymentsIntroSheet (
747747 onContinue = {
748- appViewModel.dismissTimedSheet(skipQueue = true )
748+ appViewModel.dismissTimedSheet()
749749 navigator.navigate(Routes .BackgroundPayments .Settings )
750750 },
751751 )
@@ -759,7 +759,7 @@ private fun EntryProviderScope<NavKey>.sheetFlowEntries(
759759 }
760760 QuickPayIntroSheet (
761761 onContinue = {
762- appViewModel.dismissTimedSheet(skipQueue = true )
762+ appViewModel.dismissTimedSheet()
763763 navigator.navigate(Routes .QuickPay .Settings )
764764 },
765765 )
@@ -777,7 +777,7 @@ private fun EntryProviderScope<NavKey>.sheetFlowEntries(
777777 learnMoreClick = {
778778 val intent = Intent (Intent .ACTION_VIEW , Env .STORING_BITCOINS_URL .toUri())
779779 context.startActivity(intent)
780- appViewModel.dismissTimedSheet(skipQueue = true )
780+ appViewModel.dismissTimedSheet()
781781 navigator.goBack()
782782 },
783783 )
Original file line number Diff line number Diff line change @@ -42,20 +42,15 @@ class TimedSheetManager(private val scope: CoroutineScope) {
4242 checkJob = null
4343 }
4444
45- fun dismissCurrentSheet (skipQueue : Boolean = false ) {
45+ fun dismissCurrentSheet () {
4646 if (currentTimedSheet == null ) return
4747
4848 scope.launch {
4949 currentTimedSheet?.onDismissed()
5050 _currentSheet .value = null
5151 currentTimedSheet = null
5252
53- if (skipQueue) {
54- Logger .debug(" Clearing timed sheet queue" , context = TAG )
55- } else {
56- delay(CHECK_DELAY_MILLIS )
57- checkAndShowNextSheet()
58- }
53+ Logger .debug(" Clearing timed sheet queue" , context = TAG )
5954 }
6055 }
6156
Original file line number Diff line number Diff line change @@ -1736,8 +1736,7 @@ class AppViewModel @Inject constructor(
17361736
17371737 fun onLeftHome () = timedSheetManager.onHomeScreenExited()
17381738
1739- fun dismissTimedSheet (skipQueue : Boolean = false) =
1740- timedSheetManager.dismissCurrentSheet(skipQueue)
1739+ fun dismissTimedSheet () = timedSheetManager.dismissCurrentSheet()
17411740
17421741 private suspend fun checkCriticalAppUpdate () = withContext(bgDispatcher) {
17431742 delay(SCREEN_TRANSITION_DELAY_MS )
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ class TimedSheetManagerTest : BaseUnitTest() {
103103
104104 assertEquals(TimedSheetType .APP_UPDATE , sut.currentSheet.value)
105105
106- sut.dismissCurrentSheet(skipQueue = true )
106+ sut.dismissCurrentSheet()
107107 testScope.advanceTimeBy(100 )
108108
109109 assertNull(sut.currentSheet.value)
@@ -139,7 +139,7 @@ class TimedSheetManagerTest : BaseUnitTest() {
139139
140140 assertEquals(TimedSheetType .BACKUP , sut.currentSheet.value)
141141
142- sut.dismissCurrentSheet(skipQueue = false )
142+ sut.dismissCurrentSheet()
143143 testScope.advanceTimeBy(100 )
144144
145145 assertNull(sut.currentSheet.value)
You can’t perform that action at this time.
0 commit comments