Removes unnecessary checks since the dual LiveData structure was activated

This commit is contained in:
Vitor Pamplona 2023-08-29 17:57:47 -04:00
parent 4016458540
commit 053de4d06f
2 changed files with 2 additions and 9 deletions

View File

@ -737,16 +737,12 @@ class NoteBundledRefresherLiveData(val note: Note) : LiveData<NoteState>(NoteSta
}
fun invalidateData() {
if (!hasObservers()) return
checkNotInMainThread()
bundler.invalidate() {
checkNotInMainThread()
if (hasActiveObservers()) {
postValue(NoteState(note))
}
postValue(NoteState(note))
}
}

View File

@ -469,15 +469,12 @@ class UserBundledRefresherLiveData(val user: User) : LiveData<UserState>(UserSta
}
fun invalidateData() {
if (!hasObservers()) return
checkNotInMainThread()
bundler.invalidate() {
checkNotInMainThread()
if (hasActiveObservers()) {
postValue(UserState(user))
}
postValue(UserState(user))
}
}