Refactor: rename getMyDecryptedMessages method to make it more explicit

that its only used for MailboxMsg
This commit is contained in:
chimp1984 2021-01-12 13:54:54 -05:00
parent 5cdae8620b
commit d353140e7a
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3
3 changed files with 3 additions and 3 deletions

View file

@ -80,7 +80,7 @@ public class CleanupMailboxMessages {
}
private void cleanupMailboxMessages(List<Trade> trades) {
mailboxMessageService.getMyDecryptedMessages()
mailboxMessageService.getMyDecryptedMailboxMessages()
.forEach(message -> handleDecryptedMessageWithPubKey(message, trades));
}

View file

@ -86,7 +86,7 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D
// change and leave that for a later PR
UserThread.runAfter(() -> {
mailboxMessageService.addDecryptedMailboxListener(this);
mailboxMessageService.getMyDecryptedMessages()
mailboxMessageService.getMyDecryptedMailboxMessages()
.forEach(this::handleDecryptedMailboxMessageWithPubKey);
}, 100, TimeUnit.MILLISECONDS);
}

View file

@ -290,7 +290,7 @@ public class MailboxMessageService implements SetupListener, RequestDataManager.
}
}
public Set<DecryptedMessageWithPubKey> getMyDecryptedMessages() {
public Set<DecryptedMessageWithPubKey> getMyDecryptedMailboxMessages() {
return mailboxItemsByUid.values().stream()
.filter(MailboxItem::isMine)
.map(MailboxItem::getDecryptedMessageWithPubKey)