projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Small and insignificant optimization
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
notify
/
ListNotificationFilters.java
diff --git
a/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java
b/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java
index
1d4aa68
..
1261fc9
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java
+++ b/
src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java
@@
-108,7
+108,7
@@
public class ListNotificationFilters {
* @return The filtered new-post notification, or {@code null} if the
* notification should be removed
*/
* @return The filtered new-post notification, or {@code null} if the
* notification should be removed
*/
- p
ublic
static ListNotification<Post> filterNewPostNotification(ListNotification<Post> newPostNotification, Sone currentSone, boolean soneRequired) {
+ p
rivate
static ListNotification<Post> filterNewPostNotification(ListNotification<Post> newPostNotification, Sone currentSone, boolean soneRequired) {
if (soneRequired && (currentSone == null)) {
return null;
}
if (soneRequired && (currentSone == null)) {
return null;
}
@@
-144,7
+144,7
@@
public class ListNotificationFilters {
* @return The filtered new-reply notification, or {@code null} if the
* notification should be removed
*/
* @return The filtered new-reply notification, or {@code null} if the
* notification should be removed
*/
- p
ublic
static ListNotification<PostReply> filterNewReplyNotification(ListNotification<PostReply> newReplyNotification, Sone currentSone) {
+ p
rivate
static ListNotification<PostReply> filterNewReplyNotification(ListNotification<PostReply> newReplyNotification, Sone currentSone) {
if (currentSone == null) {
return null;
}
if (currentSone == null) {
return null;
}
@@
-248,10
+248,7
@@
public class ListNotificationFilters {
return false;
}
}
return false;
}
}
- if (post.getTime() > System.currentTimeMillis()) {
- return false;
- }
- return true;
+ return post.getTime() <= System.currentTimeMillis();
}
/**
}
/**
@@
-290,10
+287,7
@@
public class ListNotificationFilters {
if (!isPostVisible(sone, post.get())) {
return false;
}
if (!isPostVisible(sone, post.get())) {
return false;
}
- if (reply.getTime() > System.currentTimeMillis()) {
- return false;
- }
- return true;
+ return reply.getTime() <= System.currentTimeMillis();
}
}
}
}