synchronized (newPosts) {
boolean isNew = !knownPosts.contains(postId) && newPosts.contains(postId);
if (markAsKnown) {
- newPosts.remove(postId);
- knownPosts.add(postId);
- if (isNew) {
- coreListenerManager.fireMarkPostKnown(getPost(postId));
+ Post post = getPost(postId, false);
+ if (post != null) {
+ markPostKnown(post);
}
}
return isNew;
synchronized (newReplies) {
boolean isNew = !knownReplies.contains(replyId) && newReplies.contains(replyId);
if (markAsKnown) {
- newReplies.remove(replyId);
- knownReplies.add(replyId);
- if (isNew) {
- coreListenerManager.fireMarkReplyKnown(getReply(replyId));
+ Reply reply = getReply(replyId, false);
+ if (reply != null) {
+ markReplyKnown(reply);
}
}
return isNew;