mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-25 10:37:51 +02:00
Replace PageLoader.getPage() with PageLoader.loadPage() (#8976)
* Follow page status via StateFlow Keep getPage subscription since it's needed to load the pages * Replace PageLoader.getPage with PageLoader.loadPage
This commit is contained in:
@ -20,10 +20,14 @@ open class Page(
|
||||
get() = index + 1
|
||||
|
||||
@Transient
|
||||
@Volatile
|
||||
var status: State = State.QUEUE
|
||||
private val _statusFlow = MutableStateFlow(State.QUEUE)
|
||||
|
||||
@Transient
|
||||
val statusFlow = _statusFlow.asStateFlow()
|
||||
var status: State
|
||||
get() = _statusFlow.value
|
||||
set(value) {
|
||||
field = value
|
||||
_statusFlow.value = value
|
||||
statusSubject?.onNext(value)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user