mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-18 05:41:56 +01:00
No need to check for the MainThread in every updateFeedWith
This commit is contained in:
parent
eda5bc50e6
commit
5fbf0462fa
@ -183,8 +183,6 @@ class FeedContentState(
|
||||
}
|
||||
|
||||
fun updateFeedWith(newNotes: Set<Note>) {
|
||||
checkNotInMainThread()
|
||||
|
||||
if (
|
||||
localFilter is AdditiveFeedFilter &&
|
||||
(_feedContent.value is FeedState.Loaded || _feedContent.value is FeedState.Empty)
|
||||
|
@ -22,6 +22,7 @@ package com.vitorpamplona.amethyst.ui.screen.loggedIn
|
||||
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.vitorpamplona.amethyst.model.Note
|
||||
import com.vitorpamplona.amethyst.service.checkNotInMainThread
|
||||
import com.vitorpamplona.amethyst.ui.dal.ChatroomListKnownFeedFilter
|
||||
import com.vitorpamplona.amethyst.ui.dal.ChatroomListNewFeedFilter
|
||||
import com.vitorpamplona.amethyst.ui.dal.DiscoverChatFeedFilter
|
||||
@ -66,6 +67,8 @@ class AccountFeedContentStates(
|
||||
}
|
||||
|
||||
fun updateFeedsWith(newNotes: Set<Note>) {
|
||||
checkNotInMainThread()
|
||||
|
||||
homeNewThreads.updateFeedWith(newNotes)
|
||||
homeReplies.updateFeedWith(newNotes)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user