Skip to content

Commit

Permalink
check API compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Okuro3499 committed Jul 10, 2024
1 parent 9f2da9c commit 5e28f12
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ abstract class BaseRecyclerFragment<LI> : BaseRecyclerParentFragment<Any?>(), On
arguments?.let {
isMyCourseLib = it.getBoolean("isMyCourseLib")
courseLib = it.getString("courseLib")
resources = it.getSerializable("resources", ArrayList::class.java) as? List<RealmMyLibrary>
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
resources = it.getSerializable("resources", ArrayList::class.java) as? List<RealmMyLibrary>
} else {
@Suppress("DEPRECATION")
resources = it.getSerializable("resources") as? List<RealmMyLibrary>
}
}
}

Expand Down

0 comments on commit 5e28f12

Please sign in to comment.