Fix crash when deleting account

This commit is contained in:
Paul Schaub 2020-11-03 18:11:09 +01:00
parent c09dc77859
commit 7d6b75b326
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 4 additions and 1 deletions

View File

@ -77,8 +77,11 @@ public class AccountListViewModel implements MercuryViewModel {
return upstream.map(state -> {
List<AccountViewItem> viewItems = new ArrayList<>();
for (Map.Entry<UUID, ConnectionState> entry : state.getConnectionStates().entrySet()) {
ConnectionState connectionState = entry.getValue();
Account account = accountRepository.getAccount(entry.getKey()).blockingGet();
if (account == null) {
continue;
}
ConnectionState connectionState = entry.getValue();
OpenPgpV4Fingerprint fingerprint = null;
try {
PGPSecretKeyRingCollection secretKeyRings = openPgpRepository.loadSecretKeysOf(account.getId(), account.getJid()).blockingGet();