Skip to content

Commit

Permalink
fix notification with switch shown on activity change from activity n…
Browse files Browse the repository at this point in the history
…otification
  • Loading branch information
Razeeman committed Nov 17, 2024
1 parent 8a8144b commit b1882bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ class AddRunningRecordMediator @Inject constructor(
removeRunningRecordMediator.removeWithRecordAdd(
runningRecord = it,
updateWidgets = false,
updateNotificationSwitch = false,
timeEnded = splitTime,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -38,6 +39,7 @@ class RemoveRunningRecordMediator @Inject constructor(
remove(
typeId = runningRecord.id,
updateWidgets = updateWidgets,
updateNotificationSwitch = updateNotificationSwitch,
)
pomodoroStopInteractor.checkAndStop(runningRecord.id)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ class ActivityStartStopFromBroadcastInteractor @Inject constructor(
delay(500)
completeTypesStateInteractor.notificationTypeIds -= selectedTypeId
update(from, typesShift)
} else {
update(from, typesShift)
}

update(from, typesShift)
}
}

Expand Down

0 comments on commit b1882bd

Please sign in to comment.