require Simple Thank You for save folder customization

This commit is contained in:
tibbi 2022-11-27 20:29:07 +01:00
parent e5c35ff9ee
commit c45b790f98

View File

@ -6,6 +6,7 @@ import com.simplemobiletools.camera.BuildConfig
import com.simplemobiletools.camera.R import com.simplemobiletools.camera.R
import com.simplemobiletools.camera.extensions.config import com.simplemobiletools.camera.extensions.config
import com.simplemobiletools.camera.models.CaptureMode import com.simplemobiletools.camera.models.CaptureMode
import com.simplemobiletools.commons.dialogs.FeatureLockedDialog
import com.simplemobiletools.commons.dialogs.FilePickerDialog import com.simplemobiletools.commons.dialogs.FilePickerDialog
import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
@ -14,9 +15,9 @@ import com.simplemobiletools.commons.helpers.NavigationIcon
import com.simplemobiletools.commons.helpers.isTiramisuPlus import com.simplemobiletools.commons.helpers.isTiramisuPlus
import com.simplemobiletools.commons.models.FAQItem import com.simplemobiletools.commons.models.FAQItem
import com.simplemobiletools.commons.models.RadioItem import com.simplemobiletools.commons.models.RadioItem
import java.util.Locale
import kotlin.system.exitProcess
import kotlinx.android.synthetic.main.activity_settings.* import kotlinx.android.synthetic.main.activity_settings.*
import java.util.*
import kotlin.system.exitProcess
class SettingsActivity : SimpleActivity() { class SettingsActivity : SimpleActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
@ -169,8 +170,10 @@ class SettingsActivity : SimpleActivity() {
} }
private fun setupSavePhotosFolder() { private fun setupSavePhotosFolder() {
settings_save_photos_label.text = addLockedLabelIfNeeded(R.string.save_photos)
settings_save_photos.text = getLastPart(config.savePhotosFolder) settings_save_photos.text = getLastPart(config.savePhotosFolder)
settings_save_photos_holder.setOnClickListener { settings_save_photos_holder.setOnClickListener {
if (isOrWasThankYouInstalled()) {
FilePickerDialog(this, config.savePhotosFolder, false, showFAB = true) { FilePickerDialog(this, config.savePhotosFolder, false, showFAB = true) {
val path = it val path = it
handleSAFDialog(it) { success -> handleSAFDialog(it) { success ->
@ -180,6 +183,9 @@ class SettingsActivity : SimpleActivity() {
} }
} }
} }
} else {
FeatureLockedDialog(this) { }
}
} }
} }