From 3d0f72d50b4ff21eec2d8e4c6002c581e48e8d23 Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 17 May 2020 05:29:03 -0400 Subject: [PATCH] Show "no results found" error when search tracker doesn't find anything --- .../kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt index fa6f3adae4..e83dd1adcd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsPresenter.kt @@ -826,6 +826,16 @@ class MangaDetailsPresenter( } if (!results.isNullOrEmpty()) { withContext(Dispatchers.Main) { controller.onTrackSearchResults(results) } + } else { + withContext(Dispatchers.Main) { + controller.trackSearchError( + Exception( + preferences.context.getString( + R.string.no_results_found + ) + ) + ) + } } } }