mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
lets show some error messages during file fetching
This commit is contained in:
@@ -60,6 +60,7 @@ class MediaFetcher(val context: Context) {
|
|||||||
val includedPaths = config.includedFolders
|
val includedPaths = config.includedFolders
|
||||||
folders.filter { it.shouldFolderBeVisible(excludedPaths, includedPaths, shouldShowHidden) }.toMutableList() as ArrayList<String>
|
folders.filter { it.shouldFolderBeVisible(excludedPaths, includedPaths, shouldShowHidden) }.toMutableList() as ArrayList<String>
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
context.showErrorToast(e)
|
||||||
ArrayList()
|
ArrayList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -78,6 +79,8 @@ class MediaFetcher(val context: Context) {
|
|||||||
parents.add(path.getParentPath())
|
parents.add(path.getParentPath())
|
||||||
} while (cursor.moveToNext())
|
} while (cursor.moveToNext())
|
||||||
}
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
context.showErrorToast(e)
|
||||||
} finally {
|
} finally {
|
||||||
cursor?.close()
|
cursor?.close()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user