From 4595f6549a94e3a2c7e6992034ea4a1263006744 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 11 Aug 2019 15:50:28 +0200 Subject: [PATCH] lets show some error messages during file fetching --- .../com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt index 74bc635e9..8d381eeed 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt @@ -60,6 +60,7 @@ class MediaFetcher(val context: Context) { val includedPaths = config.includedFolders folders.filter { it.shouldFolderBeVisible(excludedPaths, includedPaths, shouldShowHidden) }.toMutableList() as ArrayList } catch (e: Exception) { + context.showErrorToast(e) ArrayList() } } @@ -78,6 +79,8 @@ class MediaFetcher(val context: Context) { parents.add(path.getParentPath()) } while (cursor.moveToNext()) } + } catch (e: Exception) { + context.showErrorToast(e) } finally { cursor?.close() }