Skip to content

Commit

Permalink
CurrentSessionManager: don't cancel the timer if the resource was cle…
Browse files Browse the repository at this point in the history
…ared in the meantime
  • Loading branch information
adrcotfas committed Nov 11, 2021
1 parent 38d6751 commit 26b81d6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ class CurrentSessionManager @Inject constructor(@ApplicationContext val context:

fun stopTimer() {
cancelAlarm()
timer.cancel()
if (this::timer.isInitialized) {
timer.cancel()
}
currentSession.setTimerState(TimerState.INACTIVE)
currentSession.setSessionType(SessionType.INVALID)
}
Expand Down

0 comments on commit 26b81d6

Please sign in to comment.