Loading k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java +9 −1 Original line number Diff line number Diff line Loading @@ -335,7 +335,15 @@ public class RecipientMvpView implements OnFocusChangeListener, OnClickListener Toast.makeText(activity, R.string.compose_error_private_missing_keys, Toast.LENGTH_LONG).show(); } public void showErrorAttachInline() { public void showErrorSignOnlyInline() { Toast.makeText(activity, R.string.error_crypto_sign_only_inline, Toast.LENGTH_LONG).show(); } public void showErrorInlineSignOnly() { Toast.makeText(activity, R.string.error_crypto_inline_sign_only, Toast.LENGTH_LONG).show(); } public void showErrorInlineAttach() { Toast.makeText(activity, R.string.error_crypto_inline_attach, Toast.LENGTH_LONG).show(); } Loading k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java +18 −3 Original line number Diff line number Diff line Loading @@ -602,7 +602,7 @@ public class RecipientPresenter implements PermissionPingCallback { public void showPgpAttachError(AttachErrorState attachErrorState) { switch (attachErrorState) { case IS_INLINE: recipientMvpView.showErrorAttachInline(); recipientMvpView.showErrorInlineAttach(); break; default: throw new AssertionError("not all error states handled, this is a bug!"); Loading Loading @@ -721,8 +721,17 @@ public class RecipientPresenter implements PermissionPingCallback { } public void onMenuSetPgpInline(boolean enablePgpInline) { cryptoEnablePgpInline = enablePgpInline; updateCryptoStatus(); if (getCurrentCryptoStatus().isSignOnly()) { if (cryptoEnablePgpInline) { Log.e(K9.LOG_TAG, "Inconsistent state: PGP/INLINE was enabled in sign-only mode!"); onCryptoPgpInlineChanged(false); } recipientMvpView.showErrorSignOnlyInline(); return; } onCryptoPgpInlineChanged(enablePgpInline); if (enablePgpInline) { boolean shouldShowPgpInlineDialog = checkAndIncrementPgpInlineDialogCounter(); if (shouldShowPgpInlineDialog) { Loading @@ -733,6 +742,12 @@ public class RecipientPresenter implements PermissionPingCallback { public void onMenuSetSignOnly(boolean enableSignOnly) { if (enableSignOnly) { if (getCurrentCryptoStatus().isPgpInlineModeEnabled()) { recipientMvpView.showErrorInlineSignOnly(); return; } onCryptoPgpInlineChanged(false); onCryptoModeChanged(CryptoMode.SIGN_ONLY); boolean shouldShowPgpSignOnlyDialog = checkAndIncrementPgpSignOnlyDialogCounter(); if (shouldShowPgpSignOnlyDialog) { Loading k9mail/src/main/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1161,6 +1161,8 @@ Please submit bug reports, contribute new features and ask questions at <string name="error_crypto_provider_connect">Cannot connect to crypto provider, check your settings or click crypto icon to retry!</string> <string name="error_crypto_provider_ui_required">Crypto provider access denied, click crypto icon to retry!</string> <string name="error_crypto_inline_attach">PGP/INLINE mode does not support attachments!</string> <string name="error_crypto_inline_sign_only">PGP/INLINE mode does not support sign-only mode!</string> <string name="error_crypto_sign_only_inline">Sign-Only mode does not support PGP/INLINE!</string> <string name="enable_inline_pgp">Enable PGP/INLINE</string> <string name="disable_inline_pgp">Disable PGP/INLINE</string> <string name="enable_sign_only">Enable PGP Sign-Only</string> Loading Loading
k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java +9 −1 Original line number Diff line number Diff line Loading @@ -335,7 +335,15 @@ public class RecipientMvpView implements OnFocusChangeListener, OnClickListener Toast.makeText(activity, R.string.compose_error_private_missing_keys, Toast.LENGTH_LONG).show(); } public void showErrorAttachInline() { public void showErrorSignOnlyInline() { Toast.makeText(activity, R.string.error_crypto_sign_only_inline, Toast.LENGTH_LONG).show(); } public void showErrorInlineSignOnly() { Toast.makeText(activity, R.string.error_crypto_inline_sign_only, Toast.LENGTH_LONG).show(); } public void showErrorInlineAttach() { Toast.makeText(activity, R.string.error_crypto_inline_attach, Toast.LENGTH_LONG).show(); } Loading
k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java +18 −3 Original line number Diff line number Diff line Loading @@ -602,7 +602,7 @@ public class RecipientPresenter implements PermissionPingCallback { public void showPgpAttachError(AttachErrorState attachErrorState) { switch (attachErrorState) { case IS_INLINE: recipientMvpView.showErrorAttachInline(); recipientMvpView.showErrorInlineAttach(); break; default: throw new AssertionError("not all error states handled, this is a bug!"); Loading Loading @@ -721,8 +721,17 @@ public class RecipientPresenter implements PermissionPingCallback { } public void onMenuSetPgpInline(boolean enablePgpInline) { cryptoEnablePgpInline = enablePgpInline; updateCryptoStatus(); if (getCurrentCryptoStatus().isSignOnly()) { if (cryptoEnablePgpInline) { Log.e(K9.LOG_TAG, "Inconsistent state: PGP/INLINE was enabled in sign-only mode!"); onCryptoPgpInlineChanged(false); } recipientMvpView.showErrorSignOnlyInline(); return; } onCryptoPgpInlineChanged(enablePgpInline); if (enablePgpInline) { boolean shouldShowPgpInlineDialog = checkAndIncrementPgpInlineDialogCounter(); if (shouldShowPgpInlineDialog) { Loading @@ -733,6 +742,12 @@ public class RecipientPresenter implements PermissionPingCallback { public void onMenuSetSignOnly(boolean enableSignOnly) { if (enableSignOnly) { if (getCurrentCryptoStatus().isPgpInlineModeEnabled()) { recipientMvpView.showErrorInlineSignOnly(); return; } onCryptoPgpInlineChanged(false); onCryptoModeChanged(CryptoMode.SIGN_ONLY); boolean shouldShowPgpSignOnlyDialog = checkAndIncrementPgpSignOnlyDialogCounter(); if (shouldShowPgpSignOnlyDialog) { Loading
k9mail/src/main/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1161,6 +1161,8 @@ Please submit bug reports, contribute new features and ask questions at <string name="error_crypto_provider_connect">Cannot connect to crypto provider, check your settings or click crypto icon to retry!</string> <string name="error_crypto_provider_ui_required">Crypto provider access denied, click crypto icon to retry!</string> <string name="error_crypto_inline_attach">PGP/INLINE mode does not support attachments!</string> <string name="error_crypto_inline_sign_only">PGP/INLINE mode does not support sign-only mode!</string> <string name="error_crypto_sign_only_inline">Sign-Only mode does not support PGP/INLINE!</string> <string name="enable_inline_pgp">Enable PGP/INLINE</string> <string name="disable_inline_pgp">Disable PGP/INLINE</string> <string name="enable_sign_only">Enable PGP Sign-Only</string> Loading