projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dump notification hash to console.
[Sone.git]
/
src
/
main
/
resources
/
static
/
javascript
/
sone.js
diff --git
a/src/main/resources/static/javascript/sone.js
b/src/main/resources/static/javascript/sone.js
index
abf3fbd
..
78d68f1
100644
(file)
--- a/
src/main/resources/static/javascript/sone.js
+++ b/
src/main/resources/static/javascript/sone.js
@@
-1096,6
+1096,16
@@
public getNotificationHash() {
}
/**
}
/**
+ * Sets the notification hash.
+ *
+ * @param notificationHash
+ * The new notification hash
+ */
+public setNotificationHash(notificationHash) {
+ $("#sone #notification-area #notification-hash").text(notificationHash);
+}
+
+/**
* Retrieves element IDs from notification elements.
*
* @param notification
* Retrieves element IDs from notification elements.
*
* @param notification
@@
-1190,6
+1200,10
@@
function getStatus() {
if (!notLoggedIn) {
showOfflineMarker(!online);
}
if (!notLoggedIn) {
showOfflineMarker(!online);
}
+ if (data.notificationHash != getNotificationHash()) {
+ console.log("Old hash: ", getNotificationHash(), ", new hash: ", data.notificationHash);
+ setNotificationHash(data.notificationHash);
+ }
/* search for removed notifications. */
$("#sone #notification-area .notification").each(function() {
notificationId = $(this).attr("id");
/* search for removed notifications. */
$("#sone #notification-area .notification").each(function() {
notificationId = $(this).attr("id");