Removes unnecessary checks since the dual LiveData structure was activated
This commit is contained in:
@@ -737,18 +737,14 @@ class NoteBundledRefresherLiveData(val note: Note) : LiveData<NoteState>(NoteSta
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun invalidateData() {
|
fun invalidateData() {
|
||||||
if (!hasObservers()) return
|
|
||||||
|
|
||||||
checkNotInMainThread()
|
checkNotInMainThread()
|
||||||
|
|
||||||
bundler.invalidate() {
|
bundler.invalidate() {
|
||||||
checkNotInMainThread()
|
checkNotInMainThread()
|
||||||
|
|
||||||
if (hasActiveObservers()) {
|
|
||||||
postValue(NoteState(note))
|
postValue(NoteState(note))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fun <Y> map(
|
fun <Y> map(
|
||||||
transform: (NoteState) -> Y
|
transform: (NoteState) -> Y
|
||||||
|
|||||||
@@ -469,17 +469,14 @@ class UserBundledRefresherLiveData(val user: User) : LiveData<UserState>(UserSta
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun invalidateData() {
|
fun invalidateData() {
|
||||||
if (!hasObservers()) return
|
|
||||||
checkNotInMainThread()
|
checkNotInMainThread()
|
||||||
|
|
||||||
bundler.invalidate() {
|
bundler.invalidate() {
|
||||||
checkNotInMainThread()
|
checkNotInMainThread()
|
||||||
|
|
||||||
if (hasActiveObservers()) {
|
|
||||||
postValue(UserState(user))
|
postValue(UserState(user))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fun <Y> map(
|
fun <Y> map(
|
||||||
transform: (UserState) -> Y
|
transform: (UserState) -> Y
|
||||||
|
|||||||
Reference in New Issue
Block a user