}
if (!hasFirstStartNotification()) {
notificationManager.addNotification(isLocal ? localReplyNotification : newReplyNotification);
- if (!getMentionedSones(reply.getText()).isEmpty() && !isLocal && (reply.getPost().getSone() != null) && (reply.getTime() <= System.currentTimeMillis())) {
- mentionNotification.add(reply.getPost());
+ if (!getMentionedSones(reply.getText()).isEmpty() && !isLocal && reply.getPost().isPresent() && (reply.getTime() <= System.currentTimeMillis())) {
+ mentionNotification.add(reply.getPost().get());
notificationManager.addNotification(mentionNotification);
}
} else {
public void markReplyKnown(MarkPostReplyKnownEvent markPostReplyKnownEvent) {
newReplyNotification.remove(markPostReplyKnownEvent.postReply());
localReplyNotification.remove(markPostReplyKnownEvent.postReply());
- mentionNotification.remove(markPostReplyKnownEvent.postReply().getPost());
+ mentionNotification.remove(markPostReplyKnownEvent.postReply().getPost().get());
}
/**
localReplyNotification.remove(reply);
if (!getMentionedSones(reply.getText()).isEmpty()) {
boolean isMentioned = false;
- for (PostReply existingReply : getCore().getReplies(reply.getPost())) {
+ for (PostReply existingReply : getCore().getReplies(reply.getPost().get())) {
isMentioned |= !reply.isKnown() && !getMentionedSones(existingReply.getText()).isEmpty();
}
if (!isMentioned) {
- mentionNotification.remove(reply.getPost());
+ mentionNotification.remove(reply.getPost().get());
}
}
}
@SuppressWarnings("synthetic-access")
public void run() {
lockedSonesNotification.add(sone);
- lockedSonesTickerObjects.remove(sone);
notificationManager.addNotification(lockedSonesNotification);
}
}, 5, TimeUnit.MINUTES);