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 {
|
||||
var defaultFilename = baseConfig.lastExportedSettingsFile
|
||||
if (defaultFilename.isEmpty()) {
|
||||
val appName = baseConfig.appId.removeSuffix(".debug").removeSuffix(".pro").removePrefix("com.simplemobiletools.")
|
||||
defaultFilename = "$appName-settings_${getCurrentFormattedDateTime()}.txt"
|
||||
}
|
||||
|
||||
return defaultFilename
|
||||
val appName = baseConfig.appId.removeSuffix(".debug").removeSuffix(".pro").removePrefix("com.simplemobiletools.")
|
||||
return "$appName-settings_${getCurrentFormattedDateTime()}.txt"
|
||||
}
|
||||
|
||||
@SuppressLint("InlinedApi")
|
||||
|
|
|
@ -45,7 +45,6 @@ class ExportSettingsDialog(val activity: BaseSimpleActivity, val defaultFilename
|
|||
return@setOnClickListener
|
||||
}
|
||||
|
||||
activity.baseConfig.lastExportedSettingsFile = filename
|
||||
val newPath = "${folder.trimEnd('/')}/$filename"
|
||||
if (!newPath.getFilenameFromPath().isAValidFilename()) {
|
||||
activity.toast(R.string.filename_invalid_characters)
|
||||
|
|
|
@ -440,10 +440,6 @@ open class BaseConfig(val context: Context) {
|
|||
get() = prefs.getString(LAST_EXPORTED_SETTINGS_FOLDER, "")!!
|
||||
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
|
||||
get() = prefs.getString(LAST_BLOCKED_NUMBERS_EXPORT_PATH, "")!!
|
||||
set(lastBlockedNumbersExportPath) = prefs.edit().putString(LAST_BLOCKED_NUMBERS_EXPORT_PATH, lastBlockedNumbersExportPath).apply()
|
||||
|
|
Loading…
Reference in a new issue