When changing locale, clear previous locale specific settings
This commit is contained in:
parent
b00f2bd908
commit
e417f60a36
@ -13,7 +13,7 @@
|
|||||||
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
|
|
||||||
<Version>3.1.11.10</Version>
|
<Version>3.1.11.11</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -77,8 +77,23 @@ namespace LibationWinForms.Dialogs
|
|||||||
|
|
||||||
private void saveBtn_Click(object sender, EventArgs e)
|
private void saveBtn_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
config.DecryptKey = this.decryptKeyTb.Text;
|
var origLocale = config.LocaleCountryCode;
|
||||||
config.LocaleCountryCode = this.audibleLocaleCb.Text;
|
var newLocale = this.audibleLocaleCb.Text;
|
||||||
|
|
||||||
|
if (origLocale == newLocale)
|
||||||
|
{
|
||||||
|
config.DecryptKey = this.decryptKeyTb.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.DownloadsInProgressEnum = downloadsInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
|
||||||
config.DecryptInProgressEnum = decryptInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
|
config.DecryptInProgressEnum = decryptInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user