Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.example.android.dessertpusher

import android.os.Handler
import android.os.Looper
import timber.log.Timber

/**
Expand All @@ -43,7 +44,7 @@ class DessertTimer {
* [Handler] is a class meant to process a queue of messages (known as [android.os.Message]s)
* or actions (known as [Runnable]s)
*/
private var handler = Handler()
private var handler = Handler(Looper.getMainLooper())
private lateinit var runnable: Runnable


Expand All @@ -70,4 +71,4 @@ class DessertTimer {
// timer
handler.removeCallbacks(runnable)
}
}
}