Fix crash when deleting account
This commit is contained in:
parent
c09dc77859
commit
7d6b75b326
|
@ -77,8 +77,11 @@ public class AccountListViewModel implements MercuryViewModel {
|
||||||
return upstream.map(state -> {
|
return upstream.map(state -> {
|
||||||
List<AccountViewItem> viewItems = new ArrayList<>();
|
List<AccountViewItem> viewItems = new ArrayList<>();
|
||||||
for (Map.Entry<UUID, ConnectionState> entry : state.getConnectionStates().entrySet()) {
|
for (Map.Entry<UUID, ConnectionState> entry : state.getConnectionStates().entrySet()) {
|
||||||
ConnectionState connectionState = entry.getValue();
|
|
||||||
Account account = accountRepository.getAccount(entry.getKey()).blockingGet();
|
Account account = accountRepository.getAccount(entry.getKey()).blockingGet();
|
||||||
|
if (account == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ConnectionState connectionState = entry.getValue();
|
||||||
OpenPgpV4Fingerprint fingerprint = null;
|
OpenPgpV4Fingerprint fingerprint = null;
|
||||||
try {
|
try {
|
||||||
PGPSecretKeyRingCollection secretKeyRings = openPgpRepository.loadSecretKeysOf(account.getId(), account.getJid()).blockingGet();
|
PGPSecretKeyRingCollection secretKeyRings = openPgpRepository.loadSecretKeysOf(account.getId(), account.getJid()).blockingGet();
|
||||||
|
|
Loading…
Reference in New Issue