fix: null media.users

This commit is contained in:
rebelonion 2024-04-29 22:30:35 -05:00
parent 69fb86d015
commit 95a9d289c9
2 changed files with 1 additions and 2 deletions

View file

@ -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) {

View file

@ -573,7 +573,7 @@ class MediaInfoFragment : Fragment() {
parent.addView(root)
}
}
val users = media.users!!
val users: ArrayList<User> = media.users ?: arrayListOf()
if (Anilist.token != null && media.userStatus != null) {
users.add(0,
User(