diff options
author | Mario <mario@mariovavti.com> | 2021-07-29 06:59:13 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-07-29 06:59:13 +0000 |
commit | 9722d157bf138753bc168f68c56b4963db6da4e9 (patch) | |
tree | a15bb81c35a2367fe4628614471d471ed86d2712 /view/tpl/chat.tpl | |
parent | 219d47f04c7bb04dcc241b9ed6ca411fc9653f09 (diff) | |
parent | c6133d2558ce29e44342fa7be8bb65e0059aea02 (diff) | |
download | volse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.tar.gz volse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.tar.bz2 volse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.zip |
Merge branch 'dev' into bs5
Diffstat (limited to 'view/tpl/chat.tpl')
-rw-r--r-- | view/tpl/chat.tpl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl index 7e09b2071..944fbebb5 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(); } |