kopia lustrzana https://github.com/vitorpamplona/amethyst
Update lists once every second, not 100ms
rodzic
fbff78208e
commit
1306270887
|
@ -20,7 +20,7 @@ object NostrHomeDataSource: NostrDataSource<Note>("HomeFeed") {
|
|||
lateinit var account: Account
|
||||
|
||||
private val cacheListener: (UserState) -> Unit = {
|
||||
resetFilters()
|
||||
invalidateFilters()
|
||||
}
|
||||
|
||||
override fun start() {
|
||||
|
|
|
@ -78,6 +78,7 @@ abstract class FeedViewModel(val dataSource: NostrDataSource<Note>): ViewModel()
|
|||
}
|
||||
|
||||
fun refresh() {
|
||||
println("AAA Refresh")
|
||||
val scope = CoroutineScope(Job() + Dispatchers.Default)
|
||||
scope.launch {
|
||||
refreshSuspended()
|
||||
|
@ -122,7 +123,7 @@ abstract class FeedViewModel(val dataSource: NostrDataSource<Note>): ViewModel()
|
|||
handlerWaiting.set(true)
|
||||
val scope = CoroutineScope(Job() + Dispatchers.Default)
|
||||
scope.launch {
|
||||
delay(100)
|
||||
delay(1000)
|
||||
refresh()
|
||||
handlerWaiting.set(false)
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ open class LnZapFeedViewModel(val dataSource: NostrDataSource<Pair<Note, Note>>)
|
|||
handlerWaiting.set(true)
|
||||
val scope = CoroutineScope(Job() + Dispatchers.Default)
|
||||
scope.launch {
|
||||
delay(100)
|
||||
delay(1000)
|
||||
refresh()
|
||||
handlerWaiting.set(false)
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ open class UserFeedViewModel(val dataSource: NostrDataSource<User>): ViewModel()
|
|||
handlerWaiting.set(true)
|
||||
val scope = CoroutineScope(Job() + Dispatchers.Default)
|
||||
scope.launch {
|
||||
delay(100)
|
||||
delay(1000)
|
||||
refresh()
|
||||
handlerWaiting.set(false)
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue