mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
force message encrypt/decrypt view if the activities are called via *_AND_RETURN Intents
This commit is contained in:
parent
7193edbba2
commit
2170069d8a
@ -285,12 +285,25 @@ public class DecryptActivity extends BaseActivity {
|
|||||||
});
|
});
|
||||||
mReplyButton.setVisibility(View.INVISIBLE);
|
mReplyButton.setVisibility(View.INVISIBLE);
|
||||||
|
|
||||||
if (mSource.getCurrentView().getId() == R.id.sourceMessage &&
|
if (mReturnResult) {
|
||||||
mMessage.getText().length() > 0) {
|
mSourcePrevious.setClickable(false);
|
||||||
mDecryptButton.performClick();
|
mSourcePrevious.setEnabled(false);
|
||||||
|
mSourcePrevious.setVisibility(View.INVISIBLE);
|
||||||
|
|
||||||
|
mSourceNext.setClickable(false);
|
||||||
|
mSourceNext.setEnabled(false);
|
||||||
|
mSourceNext.setVisibility(View.INVISIBLE);
|
||||||
|
|
||||||
|
mSourceLabel.setClickable(false);
|
||||||
|
mSourceLabel.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSource();
|
updateSource();
|
||||||
|
|
||||||
|
if (mSource.getCurrentView().getId() == R.id.sourceMessage &&
|
||||||
|
mMessage.getText().length() > 0) {
|
||||||
|
mDecryptButton.performClick();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openFile() {
|
private void openFile() {
|
||||||
|
@ -347,6 +347,23 @@ public class EncryptActivity extends BaseActivity {
|
|||||||
updateSource();
|
updateSource();
|
||||||
updateMode();
|
updateMode();
|
||||||
|
|
||||||
|
if (mReturnResult) {
|
||||||
|
mSourcePrevious.setClickable(false);
|
||||||
|
mSourcePrevious.setEnabled(false);
|
||||||
|
mSourcePrevious.setVisibility(View.INVISIBLE);
|
||||||
|
|
||||||
|
mSourceNext.setClickable(false);
|
||||||
|
mSourceNext.setEnabled(false);
|
||||||
|
mSourceNext.setVisibility(View.INVISIBLE);
|
||||||
|
|
||||||
|
mSourceLabel.setClickable(false);
|
||||||
|
mSourceLabel.setEnabled(false);
|
||||||
|
|
||||||
|
mEncryptToClipboardButton.setEnabled(false);
|
||||||
|
mEncryptToClipboardButton.setVisibility(View.INVISIBLE);
|
||||||
|
mEncryptButton.setText(R.string.btn_encrypt);
|
||||||
|
}
|
||||||
|
|
||||||
if (mMessage.getText().length() > 0 &&
|
if (mMessage.getText().length() > 0 &&
|
||||||
((mEncryptionKeyIds != null &&
|
((mEncryptionKeyIds != null &&
|
||||||
mEncryptionKeyIds.length > 0) ||
|
mEncryptionKeyIds.length > 0) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user