Skip to content

Commit

Permalink
fix: null media.users
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelonion committed Apr 30, 2024
1 parent 69fb86d commit 95a9d28
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/ani/dantotsu/media/MediaInfoFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 95a9d28

Please sign in to comment.