kopia lustrzana https://github.com/vitorpamplona/amethyst
Only wait 5 seconds to update lists if contents are already been displayed.
rodzic
c56d3af0fc
commit
c0fe13d79c
|
@ -125,7 +125,8 @@ class CardFeedViewModel(val dataSource: NostrDataSource<Note>): ViewModel() {
|
||||||
handlerWaiting.set(true)
|
handlerWaiting.set(true)
|
||||||
val scope = CoroutineScope(Job() + Dispatchers.Default)
|
val scope = CoroutineScope(Job() + Dispatchers.Default)
|
||||||
scope.launch {
|
scope.launch {
|
||||||
delay(5000)
|
if (feedContent.value is CardFeedState.Loaded)
|
||||||
|
delay(5000)
|
||||||
refresh()
|
refresh()
|
||||||
handlerWaiting.set(false)
|
handlerWaiting.set(false)
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,7 +122,8 @@ abstract class FeedViewModel(val dataSource: NostrDataSource<Note>): ViewModel()
|
||||||
handlerWaiting.set(true)
|
handlerWaiting.set(true)
|
||||||
val scope = CoroutineScope(Job() + Dispatchers.Default)
|
val scope = CoroutineScope(Job() + Dispatchers.Default)
|
||||||
scope.launch {
|
scope.launch {
|
||||||
delay(5000)
|
if (feedContent.value is FeedState.Loaded)
|
||||||
|
delay(5000)
|
||||||
refresh()
|
refresh()
|
||||||
handlerWaiting.set(false)
|
handlerWaiting.set(false)
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,8 @@ open class UserFeedViewModel(val dataSource: NostrDataSource<User>): ViewModel()
|
||||||
handlerWaiting.set(true)
|
handlerWaiting.set(true)
|
||||||
val scope = CoroutineScope(Job() + Dispatchers.Default)
|
val scope = CoroutineScope(Job() + Dispatchers.Default)
|
||||||
scope.launch {
|
scope.launch {
|
||||||
delay(5000)
|
if (feedContent.value is UserFeedState.Loaded)
|
||||||
|
delay(5000)
|
||||||
refresh()
|
refresh()
|
||||||
handlerWaiting.set(false)
|
handlerWaiting.set(false)
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue