move the save folder to the bottom of Settings

This commit is contained in:
tibbi
2017-11-21 15:54:30 +01:00
parent c69f526c4e
commit 2bd75568ac
4 changed files with 50 additions and 50 deletions

View File

@ -28,7 +28,6 @@ class SettingsActivity : SimpleActivity() {
setupCustomizeColors()
setupUseEnglish()
setupSavePhotosFolder()
setupShowPreview()
setupSound()
setupFocusBeforeCapture()
@ -38,6 +37,7 @@ class SettingsActivity : SimpleActivity() {
setupKeepSettingsVisible()
setupAlwaysOpenBackCamera()
setupSavePhotoMetadata()
setupSavePhotosFolder()
updateTextColors(settings_holder)
}
@ -70,18 +70,6 @@ class SettingsActivity : SimpleActivity() {
}
}
private fun setupSavePhotosFolder() {
settings_save_photos.text = getLastPart(config.savePhotosFolder)
settings_save_photos_holder.setOnClickListener {
FilePickerDialog(this, config.savePhotosFolder, false, showFAB = true) {
handleSAFDialog(File(it)) {
config.savePhotosFolder = it
settings_save_photos.text = getLastPart(config.savePhotosFolder)
}
}
}
}
private fun getLastPart(path: String): String {
val humanized = humanizePath(path)
return humanized.substringAfterLast("/", humanized)
@ -158,4 +146,16 @@ class SettingsActivity : SimpleActivity() {
config.savePhotoMetadata = settings_save_photo_metadata.isChecked
}
}
private fun setupSavePhotosFolder() {
settings_save_photos.text = getLastPart(config.savePhotosFolder)
settings_save_photos_holder.setOnClickListener {
FilePickerDialog(this, config.savePhotosFolder, false, showFAB = true) {
handleSAFDialog(File(it)) {
config.savePhotosFolder = it
settings_save_photos.text = getLastPart(config.savePhotosFolder)
}
}
}
}
}