open trust key screen when download is in progress
This commit is contained in:
		
							parent
							
								
									59697eb092
								
							
						
					
					
						commit
						a1f933924c
					
				| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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()];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue