We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adc225f commit dc42d56Copy full SHA for dc42d56
app/src/main/kotlin/com/simplemobiletools/clock/fragments/StopwatchFragment.kt
@@ -199,13 +199,13 @@ class StopwatchFragment : Fragment() {
199
200
private val updateListener = object : Stopwatch.UpdateListener {
201
override fun onUpdate(totalTime: Long, lapTime: Long, useLongerMSFormat: Boolean) {
202
- activity?.run {
+ activity?.runOnUiThread {
203
updateDisplayedText(totalTime, lapTime, useLongerMSFormat)
204
}
205
206
207
override fun onStateChanged(state: Stopwatch.State) {
208
209
updateIcons(state)
210
binding.stopwatchLap.beVisibleIf(state == Stopwatch.State.RUNNING)
211
binding.stopwatchReset.beVisibleIf(state != Stopwatch.State.STOPPED)
0 commit comments