mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-25 02:18:24 +01:00
Fix a crash when retrying pages
This commit is contained in:
parent
8586014e17
commit
c65a01a5f0
@ -327,9 +327,10 @@ class ReaderPresenter(
|
|||||||
fun retryPage(page: Page?) {
|
fun retryPage(page: Page?) {
|
||||||
if (page != null && source is HttpSource) {
|
if (page != null && source is HttpSource) {
|
||||||
page.status = Page.QUEUE
|
page.status = Page.QUEUE
|
||||||
val uri = page.uri
|
val imageUrl = page.imageUrl
|
||||||
if (uri != null && !page.chapter.isDownloaded) {
|
if (imageUrl != null && !page.chapter.isDownloaded) {
|
||||||
chapterCache.removeFileFromCache(uri.encodedPath.substringAfterLast('/'))
|
val key = DiskUtil.hashKeyForDisk(page.url)
|
||||||
|
chapterCache.removeFileFromCache(key)
|
||||||
}
|
}
|
||||||
loader.retryPage(page)
|
loader.retryPage(page)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user