open trust key screen when download is in progress

This commit is contained in:
Daniel Gultsch 2018-07-07 08:53:11 +02:00
parent 59697eb092
commit a1f933924c
3 changed files with 4 additions and 3 deletions

View file

@ -1256,7 +1256,7 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
return verified;
}
public boolean hasPendingKeyFetches(Account account, List<Jid> jids) {
public boolean hasPendingKeyFetches(List<Jid> jids) {
SignalProtocolAddress ownAddress = new SignalProtocolAddress(account.getJid().asBareJid().toString(), 0);
if (fetchStatusMap.getAll(ownAddress.getName()).containsValue(FetchStatus.PENDING)) {
return true;

View file

@ -745,7 +745,8 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
boolean hasUndecidedContacts = !axolotlService.getKeysWithTrust(FingerprintStatus.createActiveUndecided(), targets).isEmpty();
boolean hasPendingKeys = !axolotlService.findDevicesWithoutSession(conversation).isEmpty();
boolean hasNoTrustedKeys = axolotlService.anyTargetHasNoTrustedKeys(targets);
if (hasUndecidedOwn || hasUndecidedContacts || hasPendingKeys || hasNoTrustedKeys || hasUnaccepted) {
boolean downloadInProgress = axolotlService.hasPendingKeyFetches(targets);
if (hasUndecidedOwn || hasUndecidedContacts || hasPendingKeys || hasNoTrustedKeys || hasUnaccepted || downloadInProgress) {
axolotlService.createSessionsIfNeeded(conversation);
Intent intent = new Intent(getActivity(), TrustKeysActivity.class);
String[] contacts = new String[targets.size()];

View file

@ -353,7 +353,7 @@ public class TrustKeysActivity extends OmemoActivity implements OnKeyStatusUpdat
}
private boolean hasPendingKeyFetches() {
return mAccount != null && mAccount.getAxolotlService().hasPendingKeyFetches(mAccount, contactJids);
return mAccount != null && mAccount.getAxolotlService().hasPendingKeyFetches(contactJids);
}