Fix some warnings

This commit is contained in:
Jays2Kings 2022-05-13 21:10:08 -04:00
parent 073b454342
commit dfd44b86e7
2 changed files with 4 additions and 4 deletions

View file

@ -221,12 +221,12 @@ class MigrationListController(bundle: Bundle? = null) :
searchResult, searchResult,
source.id, source.id,
) )
val chapters = try { val chapters: List<SChapter> = try {
source.getChapterList(localManga.toMangaInfo()).map { it.toSChapter() } source.getChapterList(localManga.toMangaInfo()).map { it.toSChapter() }
} catch (e: java.lang.Exception) { } catch (e: java.lang.Exception) {
Timber.e(e) Timber.e(e)
emptyList<SChapter>() emptyList()
} ?: emptyList() }
withContext(Dispatchers.IO) { withContext(Dispatchers.IO) {
syncChaptersWithSource(db, chapters, localManga, source) syncChaptersWithSource(db, chapters, localManga, source)
} }

View file

@ -115,7 +115,7 @@ class MigrationProcessAdapter(
fun removeManga(position: Int) { fun removeManga(position: Int) {
val item = getItem(position) ?: return val item = getItem(position) ?: return
menuItemListener.removeManga(item) menuItemListener.removeManga(item)
item?.manga?.migrationJob?.cancel() item.manga.migrationJob.cancel()
removeItem(position) removeItem(position)
items = currentItems items = currentItems
sourceFinished() sourceFinished()