@@ -1338,6 +1338,7 @@ class AppViewModel @Inject constructor(
13381338 event : Event ? ,
13391339 ) = viewModelScope.launch {
13401340 if (backupRepo.isRestoring.value) return @launch
1341+
13411342 if (! isNewTransactionSheetEnabled) {
13421343 Logger .debug(" NewTransactionSheet display blocked by isNewTransactionSheetEnabled=false" , context = TAG )
13431344 return @launch
@@ -1348,9 +1349,10 @@ class AppViewModel @Inject constructor(
13481349 paymentHashOrTxId = event.paymentHash,
13491350 type = ActivityFilter .ALL ,
13501351 txType = PaymentType .RECEIVED ,
1351- retry = false
1352+ retry = false ,
13521353 ).getOrNull()
13531354
1355+ // TODO check if this is still needed now that we're disabling the sheet during restore
13541356 // TODO Temporary fix while ldk-node bug is not fixed https://github.com/synonymdev/bitkit-android/pull/297
13551357 if (activity != null ) {
13561358 Logger .warn(" Activity ${activity.rawId()} already exists, skipping sheet" , context = TAG )
@@ -1577,13 +1579,13 @@ class AppViewModel @Inject constructor(
15771579 }
15781580
15791581 fun checkTimedSheets () {
1582+ if (backupRepo.isRestoring.value) return
1583+
15801584 if (currentTimedSheet != null || timedSheetQueue.isNotEmpty()) {
15811585 Logger .debug(" Timed sheet already active, skipping check" )
15821586 return
15831587 }
15841588
1585- if (backupRepo.isRestoring.value) return
1586-
15871589 timedSheetsScope?.cancel()
15881590 timedSheetsScope = CoroutineScope (bgDispatcher + SupervisorJob ())
15891591 timedSheetsScope?.launch {
0 commit comments