aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/chat.tpl
diff options
context:
space:
mode:
authornobody <nobody@zotlabs.com>2021-07-06 05:02:52 -0700
committernobody <nobody@zotlabs.com>2021-07-06 05:02:52 -0700
commit73b53675b1a339cfd950845279438e35b4e2dc7c (patch)
tree6b433b3f21585230bfbc71d955c8a8bcc82dd5e8 /view/tpl/chat.tpl
parentefda8aac1d7d90fd7eda4a449332eedf74342951 (diff)
parent9b9ac5054fcc424a556f366284501882b1e02e9e (diff)
downloadvolse-hubzilla-73b53675b1a339cfd950845279438e35b4e2dc7c.tar.gz
volse-hubzilla-73b53675b1a339cfd950845279438e35b4e2dc7c.tar.bz2
volse-hubzilla-73b53675b1a339cfd950845279438e35b4e2dc7c.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'view/tpl/chat.tpl')
-rw-r--r--view/tpl/chat.tpl12
1 files changed, 7 insertions, 5 deletions
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
index 7ef957b7e..2f224b3cf 100644
--- a/view/tpl/chat.tpl
+++ b/view/tpl/chat.tpl
@@ -110,7 +110,9 @@ $(document).ready(function() {
$('#chatroom_bookmarks, #vcard').hide();
$('#chatroom_list, #chatroom_members').show();
adjustInlineTopBarHeight();
- chatNotificationInit();
+ $('#toggle-notifications').one('click', function() {
+ chatNotificationInit();
+ });
});
$(window).resize(function () {
@@ -141,7 +143,7 @@ function load_chats() {
$('#chat-top-spinner').hide();
}
});
-
+
chat_timer = setTimeout(load_chats,10000);
}
@@ -218,7 +220,7 @@ var chat_notify_audio = {};
// Request notification access from the user
// TODO: Check Hubzilla member config setting before requesting permission
function chatNotificationInit() {
-
+
if (!("Notification" in window)) {
window.console.log("This browser does not support system notifications");
}
@@ -258,8 +260,8 @@ var chat_issue_notification = function (theBody,theTitle) {
}
var n = new Notification(theTitle,options);
n.onclick = function (event) {
- setTimeout(n.close.bind(n), 300);
- }
+ setTimeout(n.close.bind(n), 300);
+ }
if(chat_notify_audio_enabled) {
chat_notify_audio.play();
}