Removed remembering settings file name
This commit is contained in:
parent
014523163d
commit
3f3beb9421
3 changed files with 2 additions and 12 deletions
|
@ -733,13 +733,8 @@ abstract class BaseSimpleActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getExportSettingsFilename(): String {
|
private fun getExportSettingsFilename(): String {
|
||||||
var defaultFilename = baseConfig.lastExportedSettingsFile
|
val appName = baseConfig.appId.removeSuffix(".debug").removeSuffix(".pro").removePrefix("com.simplemobiletools.")
|
||||||
if (defaultFilename.isEmpty()) {
|
return "$appName-settings_${getCurrentFormattedDateTime()}.txt"
|
||||||
val appName = baseConfig.appId.removeSuffix(".debug").removeSuffix(".pro").removePrefix("com.simplemobiletools.")
|
|
||||||
defaultFilename = "$appName-settings_${getCurrentFormattedDateTime()}.txt"
|
|
||||||
}
|
|
||||||
|
|
||||||
return defaultFilename
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("InlinedApi")
|
@SuppressLint("InlinedApi")
|
||||||
|
|
|
@ -45,7 +45,6 @@ class ExportSettingsDialog(val activity: BaseSimpleActivity, val defaultFilename
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
}
|
}
|
||||||
|
|
||||||
activity.baseConfig.lastExportedSettingsFile = filename
|
|
||||||
val newPath = "${folder.trimEnd('/')}/$filename"
|
val newPath = "${folder.trimEnd('/')}/$filename"
|
||||||
if (!newPath.getFilenameFromPath().isAValidFilename()) {
|
if (!newPath.getFilenameFromPath().isAValidFilename()) {
|
||||||
activity.toast(R.string.filename_invalid_characters)
|
activity.toast(R.string.filename_invalid_characters)
|
||||||
|
|
|
@ -440,10 +440,6 @@ open class BaseConfig(val context: Context) {
|
||||||
get() = prefs.getString(LAST_EXPORTED_SETTINGS_FOLDER, "")!!
|
get() = prefs.getString(LAST_EXPORTED_SETTINGS_FOLDER, "")!!
|
||||||
set(lastExportedSettingsFolder) = prefs.edit().putString(LAST_EXPORTED_SETTINGS_FOLDER, lastExportedSettingsFolder).apply()
|
set(lastExportedSettingsFolder) = prefs.edit().putString(LAST_EXPORTED_SETTINGS_FOLDER, lastExportedSettingsFolder).apply()
|
||||||
|
|
||||||
var lastExportedSettingsFile: String
|
|
||||||
get() = prefs.getString(LAST_EXPORTED_SETTINGS_FILE, "")!!
|
|
||||||
set(lastExportedSettingsFile) = prefs.edit().putString(LAST_EXPORTED_SETTINGS_FILE, lastExportedSettingsFile).apply()
|
|
||||||
|
|
||||||
var lastBlockedNumbersExportPath: String
|
var lastBlockedNumbersExportPath: String
|
||||||
get() = prefs.getString(LAST_BLOCKED_NUMBERS_EXPORT_PATH, "")!!
|
get() = prefs.getString(LAST_BLOCKED_NUMBERS_EXPORT_PATH, "")!!
|
||||||
set(lastBlockedNumbersExportPath) = prefs.edit().putString(LAST_BLOCKED_NUMBERS_EXPORT_PATH, lastBlockedNumbersExportPath).apply()
|
set(lastBlockedNumbersExportPath) = prefs.edit().putString(LAST_BLOCKED_NUMBERS_EXPORT_PATH, lastBlockedNumbersExportPath).apply()
|
||||||
|
|
Loading…
Reference in a new issue