When changing locale, clear previous locale specific settings
This commit is contained in:
parent
b00f2bd908
commit
e417f60a36
@ -13,7 +13,7 @@
|
||||
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
|
||||
<Version>3.1.11.10</Version>
|
||||
<Version>3.1.11.11</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -76,9 +76,24 @@ namespace LibationWinForms.Dialogs
|
||||
}
|
||||
|
||||
private void saveBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
var origLocale = config.LocaleCountryCode;
|
||||
var newLocale = this.audibleLocaleCb.Text;
|
||||
|
||||
if (origLocale == newLocale)
|
||||
{
|
||||
config.DecryptKey = this.decryptKeyTb.Text;
|
||||
config.LocaleCountryCode = this.audibleLocaleCb.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
// when changing locale:
|
||||
// - delete decrypt key
|
||||
// - clear/delete identity tokens file
|
||||
config.LocaleCountryCode = newLocale;
|
||||
config.DecryptKey = "";
|
||||
File.Delete(AudibleApiStorage.IdentityTokensFile);
|
||||
}
|
||||
|
||||
config.DownloadsInProgressEnum = downloadsInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
|
||||
config.DecryptInProgressEnum = decryptInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user