mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-04-13 01:42:06 +02:00
make sure we update the timers on the proper thread
This commit is contained in:
parent
fe08a533a8
commit
3baf841211
@ -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…
x
Reference in New Issue
Block a user