decryptlist: re-decrypt after key lookup
This commit is contained in:
@@ -459,8 +459,9 @@ public class DecryptListFragment
|
|||||||
|
|
||||||
// un-cancel this one
|
// un-cancel this one
|
||||||
mCancelledInputUris.remove(uri);
|
mCancelledInputUris.remove(uri);
|
||||||
|
mInputDataResults.remove(uri);
|
||||||
mPendingInputUris.add(uri);
|
mPendingInputUris.add(uri);
|
||||||
mAdapter.setCancelled(uri, null);
|
mAdapter.resetItemData(uri);
|
||||||
|
|
||||||
cryptoOperation();
|
cryptoOperation();
|
||||||
|
|
||||||
@@ -663,9 +664,7 @@ public class DecryptListFragment
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCryptoOperationSuccess(ImportKeyResult result) {
|
public void onCryptoOperationSuccess(ImportKeyResult result) {
|
||||||
// TODO trigger new signature check
|
retryUri(inputUri);
|
||||||
result.createNotify(getActivity()).show();
|
|
||||||
mAdapter.setProcessingKeyLookup(inputUri, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -747,7 +746,7 @@ public class DecryptListFragment
|
|||||||
mCancelled = null;
|
mCancelled = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
void addResult(InputDataResult result) {
|
void setResult(InputDataResult result) {
|
||||||
mResult = result;
|
mResult = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1033,13 +1032,20 @@ public class DecryptListFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addResult(Uri uri, InputDataResult result) {
|
public void addResult(Uri uri, InputDataResult result) {
|
||||||
|
|
||||||
ViewModel model = new ViewModel(uri);
|
ViewModel model = new ViewModel(uri);
|
||||||
int pos = mDataset.indexOf(model);
|
int pos = mDataset.indexOf(model);
|
||||||
model = mDataset.get(pos);
|
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);
|
notifyItemChanged(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -163,6 +163,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text=""
|
android:text=""
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
tools:text="alice@example.com" />
|
tools:text="alice@example.com" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user