From ecfbc743f312d37d0e3b9a5fae4e9db74a92d7e0 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Wed, 3 Jun 2015 01:21:06 +0200 Subject: [PATCH] keep prefernces individual per dialog (affects only compression) --- .../keychain/Constants.java | 3 ++- .../keychain/ui/EncryptFilesFragment.java | 5 ++--- .../keychain/ui/EncryptTextFragment.java | 4 ++-- .../keychain/util/Preferences.java | 20 +++++++++++++++---- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/Constants.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/Constants.java index 7c2f093ee..3aa58d024 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/Constants.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/Constants.java @@ -85,7 +85,8 @@ public final class Constants { public static final String USE_DEFAULT_YUBIKEY_PIN = "useDefaultYubikeyPin"; public static final String USE_NUMKEYPAD_FOR_YUBIKEY_PIN = "useNumKeypadForYubikeyPin"; public static final String ENCRYPT_FILENAMES = "encryptFilenames"; - public static final String USE_COMPRESSION = "useCompression"; + public static final String FILE_USE_COMPRESSION = "useFileCompression"; + public static final String TEXT_USE_COMPRESSION = "useTextCompression"; public static final String USE_ARMOR = "useArmor"; } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java index 13de80eb8..99d28b234 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java @@ -41,7 +41,6 @@ import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; -import com.nispok.snackbar.Snackbar; import org.spongycastle.bcpg.CompressionAlgorithmTags; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; @@ -184,7 +183,7 @@ public class EncryptFilesFragment extends CachingCryptoOperationFragment