Diff android version check

This commit is contained in:
Kelvin K
2025-11-24 21:59:19 +01:00
parent ce2029774e
commit 105ac538bb
2 changed files with 4 additions and 4 deletions
@@ -274,7 +274,7 @@ class LibraryFragment : MainFragment() {
-1
);
}
else if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
else if(Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
sectionAlbums.isVisible = false;
}
else {
@@ -291,7 +291,7 @@ class LibraryFragment : MainFragment() {
if (albums.size == 0)
sectionAlbums.setEmpty("No albums", "No albums were found on your device", -1);
}
else if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
else if(Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
sectionArtists.isVisible = false;
}
else {
@@ -308,7 +308,7 @@ class LibraryFragment : MainFragment() {
if (videos.size == 0)
sectionVideos.setEmpty("No videos", "No videos were found on your device", -1);
}
else if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
else if(Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
sectionVideos.isVisible = false;
}
else {
@@ -193,7 +193,7 @@ class StateLibrary {
private var _cacheBucketNames: List<Bucket>? = null;
fun getVideoBucketNames(): List<Bucket> {
if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.P)
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU)
return listOf();
if(_cacheBucketNames != null)
return _cacheBucketNames ?: listOf();