From b759f713633449dbb34e007292d339f725699de6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 17 Nov 2016 12:36:27 +0100 Subject: [PATCH] implement file properties dialog --- .../gallery/adapters/DirectoryAdapter.kt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 d2b638d33..3c22cd4fa 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -13,6 +13,7 @@ import com.bumptech.glide.signature.StringSignature import com.simplemobiletools.filepicker.extensions.isAStorageRootFolder import com.simplemobiletools.filepicker.extensions.scanPaths import com.simplemobiletools.filepicker.extensions.toast +import com.simplemobiletools.fileproperties.dialogs.PropertiesDialog import com.simplemobiletools.gallery.Config import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.activities.SimpleActivity @@ -44,6 +45,10 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList { + showProperties() + true + } R.id.cab_edit -> { editDir() true @@ -93,6 +98,17 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList() + selections.forEach { paths.add(dirs[it].path) } + PropertiesDialog(activity, paths, config.showHiddenFolders) + } + } + private fun editDir() { val path = dirs[multiSelector.selectedPositions[0]].path val dir = File(path)