projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add more information to new reply information and don’t load replies if obviously...
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
WebInterface.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/WebInterface.java
b/src/main/java/net/pterodactylus/sone/web/WebInterface.java
index
c11a3cc
..
6085ff8
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/WebInterface.java
+++ b/
src/main/java/net/pterodactylus/sone/web/WebInterface.java
@@
-142,6
+142,9
@@
public class WebInterface implements CoreListener {
/** The “Sone locked” notification. */
private final ListNotification<Sone> lockedSonesNotification;
/** The “Sone locked” notification. */
private final ListNotification<Sone> lockedSonesNotification;
+ /** The “new version” notification. */
+ private final TemplateNotification newVersionNotification;
+
/**
* Creates a new web interface.
*
/**
* Creates a new web interface.
*
@@
-190,6
+193,9
@@
public class WebInterface implements CoreListener {
Template lockedSonesTemplate = templateFactory.createTemplate(createReader("/templates/notify/lockedSonesNotification.html"));
lockedSonesNotification = new ListNotification<Sone>("sones-locked-notification", "sones", lockedSonesTemplate);
Template lockedSonesTemplate = templateFactory.createTemplate(createReader("/templates/notify/lockedSonesNotification.html"));
lockedSonesNotification = new ListNotification<Sone>("sones-locked-notification", "sones", lockedSonesTemplate);
+
+ Template newVersionTemplate = templateFactory.createTemplate(createReader("/templates/notify/newVersionNotification.html"));
+ newVersionNotification = new TemplateNotification("new-version-notification", newVersionTemplate);
}
//
}
//
@@
-706,6
+712,9
@@
public class WebInterface implements CoreListener {
*/
@Override
public void updateFound(Version version, long releaseTime) {
*/
@Override
public void updateFound(Version version, long releaseTime) {
+ newVersionNotification.set("version", version);
+ newVersionNotification.set("releaseTime", releaseTime);
+ notificationManager.addNotification(newVersionNotification);
}
/**
}
/**