diff --git a/domain/src/main/java/com/example/util/simpletimetracker/domain/interactor/AddRunningRecordMediator.kt b/domain/src/main/java/com/example/util/simpletimetracker/domain/interactor/AddRunningRecordMediator.kt index 54284e479..3cac77668 100644 --- a/domain/src/main/java/com/example/util/simpletimetracker/domain/interactor/AddRunningRecordMediator.kt +++ b/domain/src/main/java/com/example/util/simpletimetracker/domain/interactor/AddRunningRecordMediator.kt @@ -303,6 +303,7 @@ class AddRunningRecordMediator @Inject constructor( removeRunningRecordMediator.removeWithRecordAdd( runningRecord = it, updateWidgets = false, + updateNotificationSwitch = false, timeEnded = splitTime, ) } diff --git a/domain/src/main/java/com/example/util/simpletimetracker/domain/interactor/RemoveRunningRecordMediator.kt b/domain/src/main/java/com/example/util/simpletimetracker/domain/interactor/RemoveRunningRecordMediator.kt index 5cfebf017..41be4a2d6 100644 --- a/domain/src/main/java/com/example/util/simpletimetracker/domain/interactor/RemoveRunningRecordMediator.kt +++ b/domain/src/main/java/com/example/util/simpletimetracker/domain/interactor/RemoveRunningRecordMediator.kt @@ -16,6 +16,7 @@ class RemoveRunningRecordMediator @Inject constructor( suspend fun removeWithRecordAdd( runningRecord: RunningRecord, updateWidgets: Boolean = true, + updateNotificationSwitch: Boolean = true, timeEnded: Long? = null, // null - take current time. ) { val recordTimeEnded = timeEnded ?: System.currentTimeMillis() @@ -38,6 +39,7 @@ class RemoveRunningRecordMediator @Inject constructor( remove( typeId = runningRecord.id, updateWidgets = updateWidgets, + updateNotificationSwitch = updateNotificationSwitch, ) pomodoroStopInteractor.checkAndStop(runningRecord.id) } diff --git a/features/feature_notification/src/main/java/com/example/util/simpletimetracker/feature_notification/recordType/interactor/ActivityStartStopFromBroadcastInteractor.kt b/features/feature_notification/src/main/java/com/example/util/simpletimetracker/feature_notification/recordType/interactor/ActivityStartStopFromBroadcastInteractor.kt index 9d54de998..86d97b767 100644 --- a/features/feature_notification/src/main/java/com/example/util/simpletimetracker/feature_notification/recordType/interactor/ActivityStartStopFromBroadcastInteractor.kt +++ b/features/feature_notification/src/main/java/com/example/util/simpletimetracker/feature_notification/recordType/interactor/ActivityStartStopFromBroadcastInteractor.kt @@ -167,9 +167,9 @@ class ActivityStartStopFromBroadcastInteractor @Inject constructor( delay(500) completeTypesStateInteractor.notificationTypeIds -= selectedTypeId update(from, typesShift) + } else { + update(from, typesShift) } - - update(from, typesShift) } }