Fossil SCM
chat: when enabling audio notification, play the notification sound after a half-second delay. Slimmed down the option menu buttons a bit.
Commit
729e1fc56d701bb654c42709bdc7c15a102ff79e0f096ff5f57d2f1971768b05
Parent
99caeec643bd1fc…
2 files changed
+3
+1
-1
+3
| --- src/chat.js | ||
| +++ src/chat.js | ||
| @@ -939,10 +939,13 @@ | ||
| 939 | 939 | label: "Audio notifications", |
| 940 | 940 | boolValue: ()=>Chat.settings.getBool('audio-notification'), |
| 941 | 941 | callback: function(){ |
| 942 | 942 | const v = Chat.settings.getBool('audio-notification'); |
| 943 | 943 | Chat.settings.set('audio-notification', !v); |
| 944 | + if(!v){ | |
| 945 | + setTimeout(()=>Chat.playNewMessageSound(), 500); | |
| 946 | + } | |
| 944 | 947 | F.toast.message("Audio notifications "+(v ? "disabled" : "enabled")+"."); |
| 945 | 948 | } |
| 946 | 949 | }]; |
| 947 | 950 | |
| 948 | 951 | /** |
| 949 | 952 |
| --- 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 @@ | ||
| 1634 | 1634 | body.chat .chat-settings-popup > span.menu-entry > .help-buttonlet { |
| 1635 | 1635 | vertical-align: middle; |
| 1636 | 1636 | } |
| 1637 | 1637 | body.chat .chat-settings-popup > span.menu-entry > span.button { |
| 1638 | 1638 | margin: 0.25em 0.2em; |
| 1639 | - padding: 0.5em; | |
| 1639 | + padding: 0.25em; | |
| 1640 | 1640 | flex: 1 1 auto/*eliminates dead no-click zones on the right*/; |
| 1641 | 1641 | } |
| 1642 | 1642 | body.chat .chat-settings-popup > span.menu-entry > input[type=checkbox] { |
| 1643 | 1643 | cursor: inherit; |
| 1644 | 1644 | } |
| 1645 | 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.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 |