mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2024-12-27 16:55:03 +01:00
use the extension function for checking root folders
This commit is contained in:
parent
511fc5e420
commit
04e3ea1fb2
@ -111,10 +111,7 @@ class Utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isAStorageRootFolder(context: Context, path: String): Boolean {
|
fun isAStorageRootFolder(context: Context, path: String) = context.isAStorageRootFolder(path)
|
||||||
val trimmed = path.trimEnd('/')
|
|
||||||
return trimmed.isEmpty() || trimmed == context.getInternalStoragePath() || trimmed == context.getSDCardPath()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun isPhotoVideo(file: File) = file.isPhotoVideo()
|
fun isPhotoVideo(file: File) = file.isPhotoVideo()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user