From c14cc304b1464fd9c44a2597c76a085e0b7c66d0 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Mon, 13 Jul 2020 15:54:11 +0200 Subject: [PATCH] Fix fingerprint observe method --- .../messenger/data/repository/RxOpenPgpRepository.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/data/src/main/java/org/mercury_im/messenger/data/repository/RxOpenPgpRepository.java b/data/src/main/java/org/mercury_im/messenger/data/repository/RxOpenPgpRepository.java index 1633396..3e68307 100644 --- a/data/src/main/java/org/mercury_im/messenger/data/repository/RxOpenPgpRepository.java +++ b/data/src/main/java/org/mercury_im/messenger/data/repository/RxOpenPgpRepository.java @@ -281,16 +281,20 @@ public class RxOpenPgpRepository implements OpenPgpRepository { AnnouncedOpenPgpContactKey.MODIFICATION_DATE, OpenPgpKeyFetchDate.FETCH_DATE, OpenPgpKeyTrust.TRUST) + .from(AnnouncedOpenPgpContactKey.class) - .join(OpenPgpKeyFetchDate.class) + .leftJoin(OpenPgpKeyFetchDate.class) .on(AnnouncedOpenPgpContactKey.ACCOUNT_ID.eq(OpenPgpKeyFetchDate.ACCOUNT_ID) .and(AnnouncedOpenPgpContactKey.OWNER.eq(OpenPgpKeyFetchDate.OWNER) .and(AnnouncedOpenPgpContactKey.FINGERPRINT.eq(OpenPgpKeyFetchDate.FINGERPRINT)))) - .join(OpenPgpKeyTrust.class) + + .leftJoin(OpenPgpKeyTrust.class) .on(OpenPgpKeyTrust.ACCOUNT_ID.eq(AnnouncedOpenPgpContactKey.ACCOUNT_ID) .and(OpenPgpKeyTrust.OWNER.eq(AnnouncedOpenPgpContactKey.OWNER) .and(OpenPgpKeyTrust.FINGERPRINT.eq(AnnouncedOpenPgpContactKey.FINGERPRINT)))) + .where(AnnouncedOpenPgpContactKey.ACCOUNT_ID.eq(accountId).and(AnnouncedOpenPgpContactKey.OWNER.eq(owner))) + .get().observableResult() .map(ResultDelegate::toList) .map(list -> {