diff --git a/app/build.gradle b/app/build.gradle index 2aa24807..8064e50b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -45,7 +45,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:4.0.18' + implementation 'com.simplemobiletools:commons:4.1.4' 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 1e54ba61..05979ad9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt @@ -563,7 +563,7 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave override fun drawFocusRect(x: Int, y: Int) = mFocusRectView.drawFocusRect(x, y) override fun mediaSaved(path: String) { - scanPath(path) { + rescanPaths(arrayListOf(path)) { setupPreviewImage(mIsInPhotoMode) Intent(BROADCAST_REFRESH_MEDIA).apply { putExtra(REFRESH_PATH, path) diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/views/Preview.kt b/app/src/main/kotlin/com/simplemobiletools/camera/views/Preview.kt index f399a5b4..ce810502 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/views/Preview.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/views/Preview.kt @@ -765,7 +765,7 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan try { toggleShutterSound(true) mRecorder!!.stop() - mActivity!!.scanPath(mCurrVideoPath) {} + mActivity!!.rescanPaths(arrayListOf(mCurrVideoPath)) } catch (e: RuntimeException) { mActivity!!.showErrorToast(e) toggleShutterSound(false) @@ -774,7 +774,6 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan mIsRecording = false releaseCamera() } - } mRecorder = null