From 88497c21afd15c18f3a671a5697bd7066a221594 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 5 May 2020 16:15:21 +0200 Subject: [PATCH] reverting glide back to 4.10.0, it was too unstable --- app/build.gradle | 4 ++-- .../gallery/pro/activities/ViewPagerActivity.kt | 2 +- .../com/simplemobiletools/gallery/pro/extensions/Context.kt | 2 +- .../simplemobiletools/gallery/pro/fragments/VideoFragment.kt | 2 +- .../com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ca7810628..68fbc02cd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -78,7 +78,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.27.4' + implementation 'com.simplemobiletools:commons:5.27.7' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' @@ -94,7 +94,7 @@ dependencies { implementation 'com.github.tibbi:gestureviews:512f929d82' implementation 'com.github.tibbi:subsampling-scale-image-view:381878c078' - kapt 'com.github.bumptech.glide:compiler:4.11.0' + kapt 'com.github.bumptech.glide:compiler:4.10.0' kapt 'androidx.room:room-compiler:2.2.5' implementation 'androidx.room:room-runtime:2.2.5' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index 06e97a770..a29be1226 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -389,7 +389,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } val isFavorite = favoritesDB.isFavorite(mPath) - val duration = if (type == TYPE_VIDEOS) getVideoDuration(mPath) ?: 0 else 0 + val duration = if (type == TYPE_VIDEOS) getDuration(mPath) ?: 0 else 0 val ts = System.currentTimeMillis() val medium = Medium(null, mPath.getFilenameFromPath(), mPath, mPath.getParentPath(), ts, ts, File(mPath).length(), type, duration, isFavorite, 0) mediaDB.insert(medium) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt index 79794510f..f5fb3572d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt @@ -789,7 +789,7 @@ fun Context.addPathToDB(path: String) { try { val isFavorite = favoritesDB.isFavorite(path) - val videoDuration = if (type == TYPE_VIDEOS) getVideoDuration(path) ?: 0 else 0 + val videoDuration = if (type == TYPE_VIDEOS) getDuration(path) ?: 0 else 0 val medium = Medium(null, path.getFilenameFromPath(), path, path.getParentPath(), System.currentTimeMillis(), System.currentTimeMillis(), File(path).length(), type, videoDuration, isFavorite, 0L) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt index 4122e2941..35c1b8913 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/VideoFragment.kt @@ -687,7 +687,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S private fun setupVideoDuration() { ensureBackgroundThread { - mDuration = context?.getVideoDuration(mMedium.path) ?: 0 + mDuration = context?.getDuration(mMedium.path) ?: 0 activity?.runOnUiThread { setupTimeHolder() 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 4cbef5ad3..9e66b62b8 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 @@ -294,7 +294,7 @@ class MediaFetcher(val context: Context) { } else { val lastModified = if (getProperLastModified) file.lastModified() else 0L var dateTaken = lastModified - val videoDuration = if (getVideoDurations && isVideo) context.getVideoDuration(path) ?: 0 else 0 + val videoDuration = if (getVideoDurations && isVideo) context.getDuration(path) ?: 0 else 0 if (getProperDateTaken) { var newDateTaken = dateTakens.remove(path) @@ -383,7 +383,7 @@ class MediaFetcher(val context: Context) { } val path = Uri.decode(file.uri.toString().replaceFirst("${context.config.OTGTreeUri}/document/${context.config.OTGPartition}%3A", "${context.config.OTGPath}/")) - val videoDuration = if (getVideoDurations) context.getVideoDuration(path) ?: 0 else 0 + val videoDuration = if (getVideoDurations) context.getDuration(path) ?: 0 else 0 val isFavorite = favoritePaths.contains(path) val medium = Medium(null, filename, path, folder, dateModified, dateTaken, size, type, videoDuration, isFavorite, 0L) media.add(medium)