diff --git a/app/build.gradle b/app/build.gradle index 2fc857262..c0261b3ff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -47,7 +47,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:4.4.1' + implementation 'com.simplemobiletools:commons:4.4.10' implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0' implementation 'com.android.support:multidex:1.0.3' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index 5bfbca020..761a06cce 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -99,9 +99,9 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList renameDir() R.id.cab_pin -> pinFolders(true) R.id.cab_unpin -> pinFolders(false) - R.id.cab_hide -> toggleFoldersVisibility(true) R.id.cab_empty_recycle_bin -> emptyRecycleBin() R.id.cab_empty_disable_recycle_bin -> emptyAndDisableRecycleBin() + R.id.cab_hide -> toggleFoldersVisibility(true) R.id.cab_unhide -> toggleFoldersVisibility(false) R.id.cab_exclude -> tryExcludeFolder() R.id.cab_copy_to -> copyMoveTo(true) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt index 224067c83..ff28bb642 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt @@ -151,6 +151,11 @@ fun BaseSimpleActivity.removeNoMedia(path: String, callback: (() -> Unit)? = nul fun BaseSimpleActivity.toggleFileVisibility(oldPath: String, hide: Boolean, callback: ((newPath: String) -> Unit)? = null) { val path = oldPath.getParentPath() var filename = oldPath.getFilenameFromPath() + if ((hide && filename.startsWith('.')) || (!hide && !filename.startsWith('.'))) { + callback?.invoke(oldPath) + return + } + filename = if (hide) { ".${filename.trimStart('.')}" } else { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt index eeb6de4d9..f932ec7d0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -406,7 +406,6 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S mView?.video_play_outline?.setImageResource(R.drawable.ic_play) mView?.video_play_outline?.alpha = PLAY_PAUSE_VISIBLE_ALPHA activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) - } private fun videoEnded() = mExoPlayer!!.currentPosition >= mExoPlayer!!.duration diff --git a/app/src/main/res/drawable-hdpi/ic_hide.png b/app/src/main/res/drawable-hdpi/ic_hide.png deleted file mode 100644 index b46cb212a..000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_hide.png and /dev/null differ diff --git a/app/src/main/res/drawable-hdpi/ic_unhide.png b/app/src/main/res/drawable-hdpi/ic_unhide.png deleted file mode 100644 index 4791d9f7d..000000000 Binary files a/app/src/main/res/drawable-hdpi/ic_unhide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_hide.png b/app/src/main/res/drawable-xhdpi/ic_hide.png deleted file mode 100644 index 62db27510..000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_hide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_unhide.png b/app/src/main/res/drawable-xhdpi/ic_unhide.png deleted file mode 100644 index 604bfd012..000000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_unhide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_hide.png b/app/src/main/res/drawable-xxhdpi/ic_hide.png deleted file mode 100644 index 9ab0c3759..000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_hide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_unhide.png b/app/src/main/res/drawable-xxhdpi/ic_unhide.png deleted file mode 100644 index 196ab015f..000000000 Binary files a/app/src/main/res/drawable-xxhdpi/ic_unhide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_hide.png b/app/src/main/res/drawable-xxxhdpi/ic_hide.png deleted file mode 100644 index 3e7242a2e..000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_hide.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_unhide.png b/app/src/main/res/drawable-xxxhdpi/ic_unhide.png deleted file mode 100644 index 8382da2ea..000000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_unhide.png and /dev/null differ diff --git a/build.gradle b/build.gradle index ce1386288..82672aab8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.2.50' + ext.kotlin_version = '1.2.51' repositories { jcenter()