diff --git a/app/build.gradle b/app/build.gradle index b08f3ff7..958ffed4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,7 +42,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.8.0' + implementation 'com.simplemobiletools:commons:3.8.1' debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion" releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion" diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt index f717683f..d1257cd9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt @@ -24,6 +24,7 @@ import com.simplemobiletools.camera.views.FocusRectView import com.simplemobiletools.camera.views.Preview import com.simplemobiletools.camera.views.Preview.PreviewListener import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.BROADCAST_REFRESH_MEDIA import com.simplemobiletools.commons.helpers.PERMISSION_CAMERA import com.simplemobiletools.commons.helpers.PERMISSION_RECORD_AUDIO import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE @@ -564,6 +565,10 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave override fun mediaSaved(path: String) { scanPath(path) { setupPreviewImage(mIsInPhotoMode) + Intent(BROADCAST_REFRESH_MEDIA).apply { + `package` = "com.simplemobiletools.gallery" + sendBroadcast(this) + } } if (isImageCaptureIntent()) {