Skip to content

Commit 723f848

Browse files
committed
fix #413, add a button for showing Favorites at the destination picker
1 parent 665b401 commit 723f848

File tree

8 files changed

+6
-12
lines changed

8 files changed

+6
-12
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ android {
5858
}
5959

6060
dependencies {
61-
implementation 'com.simplemobiletools:commons:5.30.14'
61+
implementation 'com.simplemobiletools:commons:5.30.16'
6262
implementation 'com.github.Stericson:RootTools:df729dcb13'
6363
implementation 'com.github.Stericson:RootShell:1.6'
6464
implementation 'com.alexvasilkov:gesture-views:2.5.2'

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/DecompressActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class DecompressActivity : SimpleActivity() {
7979

8080
private fun decompressFiles() {
8181
val defaultFolder = getRealPathFromURI(uri!!) ?: internalStoragePath
82-
FilePickerDialog(this, defaultFolder, false, config.showHidden, true, true) { destination ->
82+
FilePickerDialog(this, defaultFolder, false, config.showHidden, true, true, showFavoritesButton = true) { destination ->
8383
handleSAFDialog(destination) {
8484
if (it) {
8585
ensureBackgroundThread {

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/SaveAsActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SaveAsActivity : SimpleActivity() {
1616
setContentView(R.layout.activity_save_as)
1717

1818
if (intent.action == Intent.ACTION_SEND && intent.extras?.containsKey(Intent.EXTRA_STREAM) == true) {
19-
FilePickerDialog(this, pickFile = false, showHidden = config.shouldShowHidden, showFAB = true) {
19+
FilePickerDialog(this, pickFile = false, showHidden = config.shouldShowHidden, showFAB = true, showFavoritesButton = true) {
2020
val destination = it
2121
handleSAFDialog(destination) {
2222
toast(R.string.saving)

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
357357
val files = getSelectedFileDirItems()
358358
val firstFile = files[0]
359359
val source = if (firstFile.isDirectory) firstFile.path else firstFile.getParentPath()
360-
FilePickerDialog(activity, source, false, activity.config.shouldShowHidden, true, true) {
360+
FilePickerDialog(activity, source, false, activity.config.shouldShowHidden, true, true, showFavoritesButton = true) {
361361
if (activity.isPathOnRoot(it) || activity.isPathOnRoot(firstFile.path)) {
362362
copyMoveRootItems(files, it, isCopyOperation)
363363
} else {

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/dialogs/CompressAsDialog.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CompressAsDialog(val activity: BaseSimpleActivity, val path: String, val c
2323

2424
file_path.text = activity.humanizePath(realPath)
2525
file_path.setOnClickListener {
26-
FilePickerDialog(activity, realPath, false, activity.config.shouldShowHidden, true, true) {
26+
FilePickerDialog(activity, realPath, false, activity.config.shouldShowHidden, true, true, showFavoritesButton = true) {
2727
file_path.text = activity.humanizePath(it)
2828
realPath = it
2929
}

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/dialogs/SaveAsDialog.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class SaveAsDialog(val activity: BaseSimpleActivity, var path: String, val hideP
3737
save_as_path.beGone()
3838
} else {
3939
save_as_path.setOnClickListener {
40-
FilePickerDialog(activity, realPath, false, false, true, true) {
40+
FilePickerDialog(activity, realPath, false, false, true, true, showFavoritesButton = true) {
4141
save_as_path.text = activity.humanizePath(it)
4242
realPath = it
4343
}

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/helpers/Config.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ class Config(context: Context) : BaseConfig(context) {
5858
favorites = currFavorites
5959
}
6060

61-
var favorites: MutableSet<String>
62-
get() = prefs.getStringSet(FAVORITES, HashSet<String>())!!
63-
set(favorites) = prefs.edit().remove(FAVORITES).putStringSet(FAVORITES, favorites).apply()
64-
6561
var isRootAvailable: Boolean
6662
get() = prefs.getBoolean(IS_ROOT_AVAILABLE, false)
6763
set(isRootAvailable) = prefs.edit().putBoolean(IS_ROOT_AVAILABLE, isRootAvailable).apply()

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/helpers/Constants.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ const val PATH = "path"
55
// shared preferences
66
const val SHOW_HIDDEN = "show_hidden"
77
const val HOME_FOLDER = "home_folder"
8-
const val FAVORITES = "favorites"
9-
const val SORT_FOLDER_PREFIX = "sort_folder_"
108
const val TEMPORARILY_SHOW_HIDDEN = "temporarily_show_hidden"
119
const val IS_ROOT_AVAILABLE = "is_root_available"
1210
const val ENABLE_ROOT_ACCESS = "enable_root_access"

0 commit comments

Comments
 (0)