mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-24 09:42:16 -05:00
small extra check
This commit is contained in:
parent
8d1047d05c
commit
cd2b493ea8
@ -326,7 +326,7 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
cancelClicked();
|
||||
cancelClicked(); //TODO: why isn't this triggered on my tablet - one of many ui problems I've had with this device. A code compatibility issue or a Samsung fail?
|
||||
return true;
|
||||
case R.id.menu_key_edit_cancel:
|
||||
cancelClicked();
|
||||
@ -520,6 +520,7 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
||||
|
||||
private void saveClicked() {
|
||||
long masterKeyId = getMasterKeyId();
|
||||
if (needsSaving()) { //make sure, as some versions don't support invalidateOptionsMenu
|
||||
try {
|
||||
if (!isPassphraseSet()) {
|
||||
throw new PgpGeneralException(this.getString(R.string.set_a_passphrase));
|
||||
@ -537,8 +538,9 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
||||
finallySaveClicked();
|
||||
}
|
||||
} catch (PgpGeneralException e) {
|
||||
//Toast.makeText(this, getString(R.string.error_message, e.getMessage()),
|
||||
// Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(this, getString(R.string.error_message, e.getMessage()),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user