mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
show a toast at stopping timer or stopwatch if it is running at onDestroy
This commit is contained in:
@ -100,6 +100,9 @@ class StopwatchFragment : Fragment() {
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
if (isRunning) {
|
||||
context?.toast(R.string.stopwatch_stopped)
|
||||
}
|
||||
isRunning = false
|
||||
updateHandler.removeCallbacks(updateRunnable)
|
||||
}
|
||||
|
@ -69,6 +69,9 @@ class TimerFragment : Fragment() {
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
if (isRunning) {
|
||||
context?.toast(R.string.timer_stopped)
|
||||
}
|
||||
isRunning = false
|
||||
updateHandler.removeCallbacks(updateRunnable)
|
||||
}
|
||||
|
Reference in New Issue
Block a user