diff --git a/app/build.gradle b/app/build.gradle
index 5a1c8d795..4661f6b2a 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -43,7 +43,7 @@ ext {
}
dependencies {
- implementation 'com.simplemobiletools:commons:3.8.0'
+ implementation 'com.simplemobiletools:commons:3.8.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.google.code.gson:gson:2.8.2'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c49d7cf4d..8eead3683 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -207,5 +207,13 @@
+
+
+
+
+
+
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/receivers/RefreshMediaReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/receivers/RefreshMediaReceiver.kt
new file mode 100644
index 000000000..589f98b45
--- /dev/null
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/receivers/RefreshMediaReceiver.kt
@@ -0,0 +1,16 @@
+package com.simplemobiletools.gallery.receivers
+
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.Intent
+import com.google.gson.Gson
+import com.simplemobiletools.gallery.asynctasks.GetDirectoriesAsynctask
+import com.simplemobiletools.gallery.extensions.config
+
+class RefreshMediaReceiver : BroadcastReceiver() {
+ override fun onReceive(context: Context, intent: Intent) {
+ GetDirectoriesAsynctask(context, false, false) {
+ context.config.directories = Gson().toJson(it)
+ }.execute()
+ }
+}