|
|
@ -80,6 +80,10 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
} |
|
|
|
} |
|
|
|
} ?: download(book, chapter) |
|
|
|
} ?: download(book, chapter) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}.onError { |
|
|
|
|
|
|
|
synchronized(loadingLock) { |
|
|
|
|
|
|
|
loadingChapters.remove(index) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -94,6 +98,10 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
download(book, chapter) |
|
|
|
download(book, chapter) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}.onError { |
|
|
|
|
|
|
|
synchronized(loadingLock) { |
|
|
|
|
|
|
|
loadingChapters.remove(index) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -107,6 +115,10 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
loadingChapters.remove(chapter.index) |
|
|
|
loadingChapters.remove(chapter.index) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}?.onError { |
|
|
|
|
|
|
|
synchronized(loadingLock) { |
|
|
|
|
|
|
|
loadingChapters.remove(chapter.index) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|