Fossil SCM

chat: when enabling audio notification, play the notification sound after a half-second delay. Slimmed down the option menu buttons a bit.

stephan 2021-01-03 12:41 trunk
Commit 729e1fc56d701bb654c42709bdc7c15a102ff79e0f096ff5f57d2f1971768b05
2 files changed +3 +1 -1
--- src/chat.js
+++ src/chat.js
@@ -939,10 +939,13 @@
939939
label: "Audio notifications",
940940
boolValue: ()=>Chat.settings.getBool('audio-notification'),
941941
callback: function(){
942942
const v = Chat.settings.getBool('audio-notification');
943943
Chat.settings.set('audio-notification', !v);
944
+ if(!v){
945
+ setTimeout(()=>Chat.playNewMessageSound(), 500);
946
+ }
944947
F.toast.message("Audio notifications "+(v ? "disabled" : "enabled")+".");
945948
}
946949
}];
947950
948951
/**
949952
--- src/chat.js
+++ src/chat.js
@@ -939,10 +939,13 @@
939 label: "Audio notifications",
940 boolValue: ()=>Chat.settings.getBool('audio-notification'),
941 callback: function(){
942 const v = Chat.settings.getBool('audio-notification');
943 Chat.settings.set('audio-notification', !v);
 
 
 
944 F.toast.message("Audio notifications "+(v ? "disabled" : "enabled")+".");
945 }
946 }];
947
948 /**
949
--- src/chat.js
+++ src/chat.js
@@ -939,10 +939,13 @@
939 label: "Audio notifications",
940 boolValue: ()=>Chat.settings.getBool('audio-notification'),
941 callback: function(){
942 const v = Chat.settings.getBool('audio-notification');
943 Chat.settings.set('audio-notification', !v);
944 if(!v){
945 setTimeout(()=>Chat.playNewMessageSound(), 500);
946 }
947 F.toast.message("Audio notifications "+(v ? "disabled" : "enabled")+".");
948 }
949 }];
950
951 /**
952
+1 -1
--- src/default.css
+++ src/default.css
@@ -1634,11 +1634,11 @@
16341634
body.chat .chat-settings-popup > span.menu-entry > .help-buttonlet {
16351635
vertical-align: middle;
16361636
}
16371637
body.chat .chat-settings-popup > span.menu-entry > span.button {
16381638
margin: 0.25em 0.2em;
1639
- padding: 0.5em;
1639
+ padding: 0.25em;
16401640
flex: 1 1 auto/*eliminates dead no-click zones on the right*/;
16411641
}
16421642
body.chat .chat-settings-popup > span.menu-entry > input[type=checkbox] {
16431643
cursor: inherit;
16441644
}
16451645
--- src/default.css
+++ src/default.css
@@ -1634,11 +1634,11 @@
1634 body.chat .chat-settings-popup > span.menu-entry > .help-buttonlet {
1635 vertical-align: middle;
1636 }
1637 body.chat .chat-settings-popup > span.menu-entry > span.button {
1638 margin: 0.25em 0.2em;
1639 padding: 0.5em;
1640 flex: 1 1 auto/*eliminates dead no-click zones on the right*/;
1641 }
1642 body.chat .chat-settings-popup > span.menu-entry > input[type=checkbox] {
1643 cursor: inherit;
1644 }
1645
--- src/default.css
+++ src/default.css
@@ -1634,11 +1634,11 @@
1634 body.chat .chat-settings-popup > span.menu-entry > .help-buttonlet {
1635 vertical-align: middle;
1636 }
1637 body.chat .chat-settings-popup > span.menu-entry > span.button {
1638 margin: 0.25em 0.2em;
1639 padding: 0.25em;
1640 flex: 1 1 auto/*eliminates dead no-click zones on the right*/;
1641 }
1642 body.chat .chat-settings-popup > span.menu-entry > input[type=checkbox] {
1643 cursor: inherit;
1644 }
1645

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button