From 704f57300b108f16b13c4bab464fd6541e0279aa Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Fri, 23 Apr 2021 14:55:13 -0400 Subject: [PATCH] Fix crash when recent manga has no title --- .../eu/kanade/tachiyomi/util/manga/MangaShortcutManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaShortcutManager.kt b/app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaShortcutManager.kt index 1c12518a22..d533e91e84 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaShortcutManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaShortcutManager.kt @@ -68,8 +68,8 @@ class MangaShortcutManager( context, "Manga-${item.id?.toString() ?: item.title}" ) - .setShortLabel(item.title) - .setLongLabel(item.title) + .setShortLabel(item.title.takeUnless { it.isNotBlank() } ?: context.getString(R.string.manga)) + .setLongLabel(item.title.takeUnless { it.isNotBlank() } ?: context.getString(R.string.manga)) .setIcon( if (bitmap != null) if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { Icon.createWithAdaptiveBitmap(bitmap.toSquare())