🛠️ Small fixes & improvements in Reader loading
* Preventing error from showing (after successful load) * Removed unnecessary delay
This commit is contained in:
parent
0fb950ff57
commit
5728253988
1 changed files with 24 additions and 23 deletions
|
|
@ -103,10 +103,10 @@ class ReaderViewModel @Inject constructor(
|
|||
|
||||
event.checkForUpdate()
|
||||
|
||||
delay(100)
|
||||
_state.update {
|
||||
it.copy(
|
||||
loading = false
|
||||
loading = false,
|
||||
errorMessage = null
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -526,7 +526,7 @@ class ReaderViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
clear()
|
||||
launch {
|
||||
withContext(Dispatchers.Default) {
|
||||
onEvent(
|
||||
ReaderEvent.OnShowHideMenu(
|
||||
show = false,
|
||||
|
|
@ -535,6 +535,8 @@ class ReaderViewModel @Inject constructor(
|
|||
activity = activity
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
onEvent(
|
||||
ReaderEvent.OnLoadText(
|
||||
checkForUpdate = {
|
||||
|
|
@ -557,7 +559,6 @@ class ReaderViewModel @Inject constructor(
|
|||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(FlowPreview::class)
|
||||
fun onUpdateProgress(refreshList: (Book) -> Unit) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue