mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 18:46:39 +02:00
Simplifies flow collection for new events.
This commit is contained in:
@@ -1197,12 +1197,11 @@ class AccountViewModel(
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
Log.d("Init", "AccountViewModel")
|
Log.d("Init", "AccountViewModel")
|
||||||
|
collectorJob =
|
||||||
viewModelScope.launch(Dispatchers.Default) {
|
viewModelScope.launch(Dispatchers.Default) {
|
||||||
feedStates.init()
|
feedStates.init()
|
||||||
// awaits for init to finish before starting to capture new events.
|
// awaits for init to finish before starting to capture new events.
|
||||||
|
|
||||||
collectorJob =
|
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
|
||||||
LocalCache.live.newEventBundles.collect { newNotes ->
|
LocalCache.live.newEventBundles.collect { newNotes ->
|
||||||
Log.d(
|
Log.d(
|
||||||
"Rendering Metrics",
|
"Rendering Metrics",
|
||||||
@@ -1214,7 +1213,6 @@ class AccountViewModel(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCleared() {
|
override fun onCleared() {
|
||||||
Log.d("Init", "AccountViewModel onCleared")
|
Log.d("Init", "AccountViewModel onCleared")
|
||||||
|
Reference in New Issue
Block a user