Commit dd0c3a5 1 parent 5590654 commit dd0c3a5 Copy full SHA for dd0c3a5
File tree 2 files changed +4
-3
lines changed
app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/advanced/process
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class MigratingManga(
22
22
val migrationScope = CoroutineScope (parentContext + SupervisorJob () + Dispatchers .Default )
23
23
24
24
// KMK -->
25
- lateinit var searchingJob: Deferred <Manga ?>
25
+ var searchingJob: Deferred <Manga ?>? = null
26
26
// KMK <--
27
27
28
28
val searchResult = MutableStateFlow <SearchResult >(SearchResult .Searching )
Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ class MigrationListScreenModel(
296
296
}
297
297
}
298
298
// KMK -->
299
- manga.searchingJob.await()
299
+ manga.searchingJob? .await()
300
300
// KMK <--
301
301
} catch (e: CancellationException ) {
302
302
// Ignore canceled migrations
@@ -571,7 +571,8 @@ class MigrationListScreenModel(
571
571
screenModelScope.launchIO {
572
572
val item = migratingItems.value.orEmpty().find { it.manga.id == mangaId }
573
573
? : return @launchIO
574
- item.searchingJob.cancel()
574
+ item.searchingJob?.cancel()
575
+ item.searchingJob = null
575
576
item.searchResult.value = SearchResult .NotFound
576
577
sourceFinished()
577
578
}
You can’t perform that action at this time.
0 commit comments