Fix crash when open manga/chapter link caused by #612

This commit is contained in:
Cuong-Tran 2025-01-07 01:30:28 +07:00
parent 51f545768f
commit f37a7b1580
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2

View file

@ -73,7 +73,12 @@ class GlobalSearchScreen(
is SearchItemResult.Success -> {
val manga = result.result.singleOrNull()
if (manga != null) {
navigator.replace(MangaScreen(manga.id, true))
// KMK -->
scope.launchIO {
val localManga = screenModel.networkToLocalManga.getLocal(manga)
// KMK <--
navigator.replace(MangaScreen(localManga.id, true))
}
} else {
// Backoff to result screen
showSingleLoadingScreen = false