mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-02-07 15:38:41 +01:00
fixing some timer threading
This commit is contained in:
parent
e515c6ff88
commit
1ff1665515
@ -93,8 +93,7 @@ class TimerFragment : Fragment() {
|
||||
private fun refreshTimers(scrollToLatest: Boolean = false) {
|
||||
activity?.timerHelper?.getTimers { timers ->
|
||||
timerAdapter.submitList(timers) {
|
||||
activity?.runOnUiThread {
|
||||
if (getView() != null) {
|
||||
getView()?.post {
|
||||
if (timerPositionToScrollTo != INVALID_POSITION && timerAdapter.itemCount > timerPositionToScrollTo) {
|
||||
view.timers_list.scrollToPosition(timerPositionToScrollTo)
|
||||
timerPositionToScrollTo = INVALID_POSITION
|
||||
@ -105,7 +104,6 @@ class TimerFragment : Fragment() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun storeStateVariables() {
|
||||
storedTextColor = requireContext().config.textColor
|
||||
|
Loading…
x
Reference in New Issue
Block a user