mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-14 21:18:56 +01:00
Clean up base classes
Should be able to throw away some of the search controller stuff after Global Search is migrated
This commit is contained in:
@@ -43,9 +43,8 @@ object DiskUtil {
|
||||
/**
|
||||
* Returns the root folders of all the available external storages.
|
||||
*/
|
||||
fun getExternalStorages(context: Context): Collection<File> {
|
||||
val directories = mutableSetOf<File>()
|
||||
directories += ContextCompat.getExternalFilesDirs(context, null)
|
||||
fun getExternalStorages(context: Context): List<File> {
|
||||
return ContextCompat.getExternalFilesDirs(context, null)
|
||||
.filterNotNull()
|
||||
.mapNotNull {
|
||||
val file = File(it.absolutePath.substringBefore("/Android/"))
|
||||
@@ -56,8 +55,6 @@ object DiskUtil {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
return directories
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user