瀏覽代碼

fix(reactions) Updated list of reactions & disabled incoming message sound (#9550)

* Changed reactions

* Disable incoming message sound on reactions
master
robertpin 3 年之前
父節點
當前提交
1223c63f69
沒有連結到貢獻者的電子郵件帳戶。
共有 3 個檔案被更改,包括 25 行新增21 行删除
  1. 6
    6
      lang/main.json
  2. 8
    4
      react/features/chat/middleware.js
  3. 11
    11
      react/features/reactions/constants.js

+ 6
- 6
lang/main.json 查看文件

805
         "accessibilityLabel": {
805
         "accessibilityLabel": {
806
             "audioOnly": "Toggle audio only",
806
             "audioOnly": "Toggle audio only",
807
             "audioRoute": "Select the sound device",
807
             "audioRoute": "Select the sound device",
808
+            "boo": "Boo",
808
             "callQuality": "Manage video quality",
809
             "callQuality": "Manage video quality",
809
             "cc": "Toggle subtitles",
810
             "cc": "Toggle subtitles",
810
             "chat": "Open / Close chat",
811
             "chat": "Open / Close chat",
818
             "hangup": "Leave the meeting",
819
             "hangup": "Leave the meeting",
819
             "help": "Help",
820
             "help": "Help",
820
             "invite": "Invite people",
821
             "invite": "Invite people",
821
-            "joy": "Laughing Crying",
822
+            "joy": "Laugh",
822
             "kick": "Kick participant",
823
             "kick": "Kick participant",
823
             "like": "Thumbs Up",
824
             "like": "Thumbs Up",
824
             "lobbyButton": "Enable/disable lobby mode",
825
             "lobbyButton": "Enable/disable lobby mode",
850
             "shareYourScreen": "Start / Stop sharing your screen",
851
             "shareYourScreen": "Start / Stop sharing your screen",
851
             "shortcuts": "Toggle shortcuts",
852
             "shortcuts": "Toggle shortcuts",
852
             "show": "Show on stage",
853
             "show": "Show on stage",
853
-            "smile": "Smile",
854
             "speakerStats": "Toggle speaker statistics",
854
             "speakerStats": "Toggle speaker statistics",
855
             "surprised": "Surprised",
855
             "surprised": "Surprised",
856
             "tileView": "Toggle tile view",
856
             "tileView": "Toggle tile view",
869
         "audioOnlyOn": "Enable low bandwidth mode",
869
         "audioOnlyOn": "Enable low bandwidth mode",
870
         "audioRoute": "Select the sound device",
870
         "audioRoute": "Select the sound device",
871
         "authenticate": "Authenticate",
871
         "authenticate": "Authenticate",
872
+        "boo": "Boo",
872
         "callQuality": "Manage video quality",
873
         "callQuality": "Manage video quality",
873
         "chat": "Open / Close chat",
874
         "chat": "Open / Close chat",
874
         "clap": "Clap",
875
         "clap": "Clap",
887
         "hangup": "Leave the meeting",
888
         "hangup": "Leave the meeting",
888
         "help": "Help",
889
         "help": "Help",
889
         "invite": "Invite people",
890
         "invite": "Invite people",
890
-        "joy": "Joy",
891
+        "joy": "Laugh",
891
         "like": "Thumbs Up",
892
         "like": "Thumbs Up",
892
         "lobbyButtonDisable": "Disable lobby mode",
893
         "lobbyButtonDisable": "Disable lobby mode",
893
         "lobbyButtonEnable": "Enable lobby mode",
894
         "lobbyButtonEnable": "Enable lobby mode",
915
         "profile": "Edit your profile",
916
         "profile": "Edit your profile",
916
         "raiseHand": "Raise / Lower your hand",
917
         "raiseHand": "Raise / Lower your hand",
917
         "raiseYourHand": "Raise your hand",
918
         "raiseYourHand": "Raise your hand",
919
+        "reactionBoo": "Send boo reaction",
918
         "reactionClap": "Send clap reaction",
920
         "reactionClap": "Send clap reaction",
919
-        "reactionJoy": "Send joy reaction",
921
+        "reactionJoy": "Send laugh reaction",
920
         "reactionLike": "Send thumbs up reaction",
922
         "reactionLike": "Send thumbs up reaction",
921
         "reactionParty": "Send party popper reaction",
923
         "reactionParty": "Send party popper reaction",
922
-        "reactionSmile": "Send smile reaction",
923
         "reactionSurprised": "Send surprised reaction",
924
         "reactionSurprised": "Send surprised reaction",
924
         "security": "Security options",
925
         "security": "Security options",
925
         "Settings": "Settings",
926
         "Settings": "Settings",
927
         "sharedvideo": "Share video",
928
         "sharedvideo": "Share video",
928
         "shareRoom": "Invite someone",
929
         "shareRoom": "Invite someone",
929
         "shortcuts": "View shortcuts",
930
         "shortcuts": "View shortcuts",
930
-        "smile": "Smile",
931
         "speakerStats": "Speaker stats",
931
         "speakerStats": "Speaker stats",
932
         "startScreenSharing": "Start screen sharing",
932
         "startScreenSharing": "Start screen sharing",
933
         "startSubtitles": "Start subtitles",
933
         "startSubtitles": "Start subtitles",

+ 8
- 4
react/features/chat/middleware.js 查看文件

164
             message: action.message,
164
             message: action.message,
165
             privateMessage: false,
165
             privateMessage: false,
166
             timestamp: Date.now()
166
             timestamp: Date.now()
167
-        });
167
+        }, false);
168
     }
168
     }
169
     }
169
     }
170
 
170
 
273
                             message: reactions[_id].message,
273
                             message: reactions[_id].message,
274
                             privateMessage: false,
274
                             privateMessage: false,
275
                             timestamp: eventData.timestamp
275
                             timestamp: eventData.timestamp
276
-                        });
276
+                        }, false);
277
                         delete reactions[_id];
277
                         delete reactions[_id];
278
                     }, 500);
278
                     }, 500);
279
                 }
279
                 }
308
  *
308
  *
309
  * @param {Store} store - The Redux store.
309
  * @param {Store} store - The Redux store.
310
  * @param {Object} message - The message object.
310
  * @param {Object} message - The message object.
311
+ * @param {boolean} shouldPlaySound - Whether or not to play the incoming message sound.
311
  * @returns {void}
312
  * @returns {void}
312
  */
313
  */
313
-function _handleReceivedMessage({ dispatch, getState }, { id, message, privateMessage, timestamp }) {
314
+function _handleReceivedMessage({ dispatch, getState },
315
+        { id, message, privateMessage, timestamp },
316
+        shouldPlaySound = true
317
+) {
314
     // Logic for all platforms:
318
     // Logic for all platforms:
315
     const state = getState();
319
     const state = getState();
316
     const { isOpen: isChatOpen } = state['features/chat'];
320
     const { isOpen: isChatOpen } = state['features/chat'];
317
 
321
 
318
-    if (!isChatOpen) {
322
+    if (shouldPlaySound && !isChatOpen) {
319
         dispatch(playSound(INCOMING_MSG_SOUND_ID));
323
         dispatch(playSound(INCOMING_MSG_SOUND_ID));
320
     }
324
     }
321
 
325
 

+ 11
- 11
react/features/reactions/constants.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
 export const REACTIONS = {
3
 export const REACTIONS = {
4
-    clap: {
5
-        message: ':clap:',
6
-        emoji: '👏',
7
-        shortcutChar: 'C'
8
-    },
9
     like: {
4
     like: {
10
         message: ':thumbs_up:',
5
         message: ':thumbs_up:',
11
         emoji: '👍',
6
         emoji: '👍',
12
         shortcutChar: 'T'
7
         shortcutChar: 'T'
13
     },
8
     },
14
-    smile: {
15
-        message: ':smile:',
16
-        emoji: '😀',
17
-        shortcutChar: 'S'
9
+    clap: {
10
+        message: ':clap:',
11
+        emoji: '👏',
12
+        shortcutChar: 'C'
18
     },
13
     },
19
     joy: {
14
     joy: {
20
-        message: ':joy:',
21
-        emoji: '😂',
15
+        message: ':grinning_face:',
16
+        emoji: '😀',
22
         shortcutChar: 'L'
17
         shortcutChar: 'L'
23
     },
18
     },
24
     surprised: {
19
     surprised: {
26
         emoji: '😮',
21
         emoji: '😮',
27
         shortcutChar: 'O'
22
         shortcutChar: 'O'
28
     },
23
     },
24
+    boo: {
25
+        message: ':slightly_frowning_face:',
26
+        emoji: '🙁',
27
+        shortcutChar: 'B'
28
+    },
29
     party: {
29
     party: {
30
         message: ':party_popper:',
30
         message: ':party_popper:',
31
         emoji: '🎉',
31
         emoji: '🎉',

Loading…
取消
儲存