From 95a9d289c96e790195740108da74dca568918950 Mon Sep 17 00:00:00 2001 From: rebelonion <87634197+rebelonion@users.noreply.github.com> Date: Mon, 29 Apr 2024 22:30:35 -0500 Subject: [PATCH] fix: null media.users --- app/src/main/java/ani/dantotsu/connections/anilist/Anilist.kt | 1 - app/src/main/java/ani/dantotsu/media/MediaInfoFragment.kt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/ani/dantotsu/connections/anilist/Anilist.kt b/app/src/main/java/ani/dantotsu/connections/anilist/Anilist.kt index 9810b8c51d..320d715b37 100644 --- a/app/src/main/java/ani/dantotsu/connections/anilist/Anilist.kt +++ b/app/src/main/java/ani/dantotsu/connections/anilist/Anilist.kt @@ -202,7 +202,6 @@ object Anilist { if (!json.text.startsWith("{")) { throw Exception(currContext()?.getString(R.string.anilist_down)) } - if (show) Logger.log("Anilist Response: ${json.text}") json.parsed() } else null } catch (e: Exception) { diff --git a/app/src/main/java/ani/dantotsu/media/MediaInfoFragment.kt b/app/src/main/java/ani/dantotsu/media/MediaInfoFragment.kt index c248800b65..caa524176e 100644 --- a/app/src/main/java/ani/dantotsu/media/MediaInfoFragment.kt +++ b/app/src/main/java/ani/dantotsu/media/MediaInfoFragment.kt @@ -573,7 +573,7 @@ class MediaInfoFragment : Fragment() { parent.addView(root) } } - val users = media.users!! + val users: ArrayList = media.users ?: arrayListOf() if (Anilist.token != null && media.userStatus != null) { users.add(0, User(