make sure we update the timers on the proper thread
This commit is contained in:
parent
fe08a533a8
commit
3baf841211
1 changed files with 2 additions and 2 deletions
|
@ -92,8 +92,8 @@ class TimerFragment : Fragment() {
|
|||
|
||||
private fun refreshTimers(scrollToLatest: Boolean = false) {
|
||||
activity?.timerHelper?.getTimers { timers ->
|
||||
timerAdapter.submitList(timers) {
|
||||
view.timers_list.post {
|
||||
activity?.runOnUiThread {
|
||||
timerAdapter.submitList(timers) {
|
||||
if (getView() != null) {
|
||||
if (timerPositionToScrollTo != INVALID_POSITION && timerAdapter.itemCount > timerPositionToScrollTo) {
|
||||
view.timers_list.scrollToPosition(timerPositionToScrollTo)
|
||||
|
|
Loading…
Reference in a new issue