mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-15 13:37:29 +01:00
Fix crash when setting cover errors (closes #7714)
This commit is contained in:
@@ -80,15 +80,12 @@ suspend fun DomainManga.editCover(
|
||||
stream: InputStream,
|
||||
updateManga: UpdateManga = Injekt.get(),
|
||||
coverCache: CoverCache = Injekt.get(),
|
||||
): Boolean {
|
||||
return if (isLocal()) {
|
||||
) {
|
||||
if (isLocal()) {
|
||||
LocalSource.updateCover(context, toDbManga(), stream)
|
||||
updateManga.awaitUpdateCoverLastModified(id)
|
||||
} else if (favorite) {
|
||||
coverCache.setCustomCoverToCache(toDbManga(), stream)
|
||||
updateManga.awaitUpdateCoverLastModified(id)
|
||||
} else {
|
||||
// We should never reach this block
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user