mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2024-12-26 08:13:48 +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 {
|
||||
val trimmed = path.trimEnd('/')
|
||||
return trimmed.isEmpty() || trimmed == context.getInternalStoragePath() || trimmed == context.getSDCardPath()
|
||||
}
|
||||
fun isAStorageRootFolder(context: Context, path: String) = context.isAStorageRootFolder(path)
|
||||
|
||||
fun isPhotoVideo(file: File) = file.isPhotoVideo()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user