mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-26 07:06:03 +03:00
Fix a crash when retrying pages
This commit is contained in:
parent
8586014e17
commit
c65a01a5f0
1 changed files with 4 additions and 3 deletions
|
@ -327,9 +327,10 @@ class ReaderPresenter(
|
|||
fun retryPage(page: Page?) {
|
||||
if (page != null && source is HttpSource) {
|
||||
page.status = Page.QUEUE
|
||||
val uri = page.uri
|
||||
if (uri != null && !page.chapter.isDownloaded) {
|
||||
chapterCache.removeFileFromCache(uri.encodedPath.substringAfterLast('/'))
|
||||
val imageUrl = page.imageUrl
|
||||
if (imageUrl != null && !page.chapter.isDownloaded) {
|
||||
val key = DiskUtil.hashKeyForDisk(page.url)
|
||||
chapterCache.removeFileFromCache(key)
|
||||
}
|
||||
loader.retryPage(page)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue