From f229b8ca3e9ade512d3d2ef9123a357153508ea9 Mon Sep 17 00:00:00 2001 From: cketti Date: Thu, 4 Jun 2020 22:26:04 +0200 Subject: [PATCH] Disable use of the signature when creating the default identity --- .../main/java/com/fsck/k9/AccountPreferenceSerializer.kt | 6 +++--- .../fsck/k9/preferences/IdentitySettingsDescriptions.java | 3 ++- .../src/main/java/com/fsck/k9/preferences/Settings.java | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt b/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt index 456215688..d6d4be366 100644 --- a/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt +++ b/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt @@ -182,7 +182,7 @@ class AccountPreferenceSerializer( gotOne = false val name = storage.getString("$accountUuid.$IDENTITY_NAME_KEY.$ident", null) val email = storage.getString("$accountUuid.$IDENTITY_EMAIL_KEY.$ident", null) - val signatureUse = storage.getBoolean("$accountUuid.signatureUse.$ident", true) + val signatureUse = storage.getBoolean("$accountUuid.signatureUse.$ident", false) val signature = storage.getString("$accountUuid.signature.$ident", null) val description = storage.getString("$accountUuid.$IDENTITY_DESCRIPTION_KEY.$ident", null) val replyTo = storage.getString("$accountUuid.replyTo.$ident", null) @@ -204,7 +204,7 @@ class AccountPreferenceSerializer( if (newIdentities.isEmpty()) { val name = storage.getString("$accountUuid.name", null) val email = storage.getString("$accountUuid.email", null) - val signatureUse = storage.getBoolean("$accountUuid.signatureUse", true) + val signatureUse = storage.getBoolean("$accountUuid.signatureUse", false) val signature = storage.getString("$accountUuid.signature", null) val identity = Identity( name = name, @@ -598,7 +598,7 @@ class AccountPreferenceSerializer( identities = ArrayList() val identity = Identity( - signatureUse = true, + signatureUse = false, signature = resourceProvider.defaultSignature(), description = resourceProvider.defaultIdentityDescription() ) diff --git a/app/core/src/main/java/com/fsck/k9/preferences/IdentitySettingsDescriptions.java b/app/core/src/main/java/com/fsck/k9/preferences/IdentitySettingsDescriptions.java index c95dd63fb..79182f298 100644 --- a/app/core/src/main/java/com/fsck/k9/preferences/IdentitySettingsDescriptions.java +++ b/app/core/src/main/java/com/fsck/k9/preferences/IdentitySettingsDescriptions.java @@ -34,7 +34,8 @@ class IdentitySettingsDescriptions { new V(1, new SignatureSetting()) )); s.put("signatureUse", Settings.versions( - new V(1, new BooleanSetting(true)) + new V(1, new BooleanSetting(true)), + new V(68, new BooleanSetting(false)) )); s.put("replyTo", Settings.versions( new V(1, new OptionalEmailAddressSetting()) diff --git a/app/core/src/main/java/com/fsck/k9/preferences/Settings.java b/app/core/src/main/java/com/fsck/k9/preferences/Settings.java index 8c387f699..3dbba232c 100644 --- a/app/core/src/main/java/com/fsck/k9/preferences/Settings.java +++ b/app/core/src/main/java/com/fsck/k9/preferences/Settings.java @@ -36,7 +36,7 @@ public class Settings { * * @see SettingsExporter */ - public static final int VERSION = 67; + public static final int VERSION = 68; static Map validate(int version, Map> settings, Map importedSettings, boolean useDefaultValues) {