diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-10-23 18:49:31 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-10-23 18:49:31 +0200 |
commit | cf51366bb7863f68989e30dba86a0d2dc1e41ce3 (patch) | |
tree | 91b3bdf3f13361fadb608322aa3c4ec41180f18a /OpenKeychain/src/main/java/org/sufficientlysecure/keychain | |
parent | 3b95fea379ce4df09f0685463d2c2fb32446326c (diff) | |
download | open-keychain-cf51366bb7863f68989e30dba86a0d2dc1e41ce3.tar.gz open-keychain-cf51366bb7863f68989e30dba86a0d2dc1e41ce3.tar.bz2 open-keychain-cf51366bb7863f68989e30dba86a0d2dc1e41ce3.zip |
decryptlist: re-decrypt after key lookup
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java index 8f36a8754..1d2bf6b9c 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java @@ -459,8 +459,9 @@ public class DecryptListFragment // un-cancel this one mCancelledInputUris.remove(uri); + mInputDataResults.remove(uri); mPendingInputUris.add(uri); - mAdapter.setCancelled(uri, null); + mAdapter.resetItemData(uri); cryptoOperation(); @@ -663,9 +664,7 @@ public class DecryptListFragment @Override public void onCryptoOperationSuccess(ImportKeyResult result) { - // TODO trigger new signature check - result.createNotify(getActivity()).show(); - mAdapter.setProcessingKeyLookup(inputUri, false); + retryUri(inputUri); } @Override @@ -747,7 +746,7 @@ public class DecryptListFragment mCancelled = null; } - void addResult(InputDataResult result) { + void setResult(InputDataResult result) { mResult = result; } @@ -1033,13 +1032,20 @@ public class DecryptListFragment } public void addResult(Uri uri, InputDataResult result) { - ViewModel model = new ViewModel(uri); int pos = mDataset.indexOf(model); model = mDataset.get(pos); + model.setResult(result); + notifyItemChanged(pos); + } - model.addResult(result); - + public void resetItemData(Uri uri) { + ViewModel model = new ViewModel(uri); + int pos = mDataset.indexOf(model); + model = mDataset.get(pos); + model.setResult(null); + model.setCancelled(null); + model.setProcessingKeyLookup(false); notifyItemChanged(pos); } |