fix(source/local): Invalidation is targeting the wrong manga object

This commit is contained in:
Ahmad Ansori Palembani 2024-07-28 14:13:48 +07:00
parent 4e75e70eee
commit 6990bccd02
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -206,14 +206,14 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
if (comicInfoFile != null)
return@withIOContext manga.copy().apply {
setMangaDetailsFromComicInfoFile(comicInfoFile.openInputStream(), this)
invalidateCover(manga)
invalidateCover(this)
}
// TODO: Remove after awhile
if (legacyJsonFile != null) {
val rt = manga.copy().apply {
setMangaDetailsFromLegacyJsonFile(legacyJsonFile.openInputStream(), this)
invalidateCover(manga)
invalidateCover(this)
}
val comicInfo = rt.toComicInfo()
localMangaDir.createFile(COMIC_INFO_FILE)