Refines visibility of refresh functions

This commit is contained in:
Vitor Pamplona 2023-03-10 09:38:56 -05:00
parent 3d877fda28
commit 1d74bfb191
3 changed files with 3 additions and 4 deletions

View File

@ -370,7 +370,7 @@ class NoteLiveData(val note: Note) : LiveData<NoteState>(NoteState(note)) {
}
}
fun refresh() {
private fun refresh() {
postValue(NoteState(note))
}

View File

@ -63,7 +63,7 @@ open class LnZapFeedViewModel(val dataSource: FeedFilter<Pair<Note, Note>>) : Vi
var handlerWaiting = AtomicBoolean()
private fun invalidateData() {
fun invalidateData() {
if (handlerWaiting.getAndSet(true)) return
val scope = CoroutineScope(Job() + Dispatchers.Default)
@ -76,7 +76,6 @@ open class LnZapFeedViewModel(val dataSource: FeedFilter<Pair<Note, Note>>) : Vi
handlerWaiting.set(false)
}
}
handlerWaiting.set(false)
}
}

View File

@ -67,7 +67,7 @@ open class UserFeedViewModel(val dataSource: FeedFilter<User>) : ViewModel() {
var handlerWaiting = AtomicBoolean()
private fun invalidateData() {
fun invalidateData() {
if (handlerWaiting.getAndSet(true)) return
val scope = CoroutineScope(Job() + Dispatchers.Default)