Selaa lähdekoodia

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

* Changed reactions

* Disable incoming message sound on reactions
master
robertpin 3 vuotta sitten
vanhempi
commit
1223c63f69
No account linked to committer's email address
3 muutettua tiedostoa jossa 25 lisäystä ja 21 poistoa
  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 Näytä tiedosto

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

+ 8
- 4
react/features/chat/middleware.js Näytä tiedosto

@@ -164,7 +164,7 @@ MiddlewareRegistry.register(store => next => action => {
164 164
             message: action.message,
165 165
             privateMessage: false,
166 166
             timestamp: Date.now()
167
-        });
167
+        }, false);
168 168
     }
169 169
     }
170 170
 
@@ -273,7 +273,7 @@ function _addChatMsgListener(conference, store) {
273 273
                             message: reactions[_id].message,
274 274
                             privateMessage: false,
275 275
                             timestamp: eventData.timestamp
276
-                        });
276
+                        }, false);
277 277
                         delete reactions[_id];
278 278
                     }, 500);
279 279
                 }
@@ -308,14 +308,18 @@ function _handleChatError({ dispatch }, error) {
308 308
  *
309 309
  * @param {Store} store - The Redux store.
310 310
  * @param {Object} message - The message object.
311
+ * @param {boolean} shouldPlaySound - Whether or not to play the incoming message sound.
311 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 318
     // Logic for all platforms:
315 319
     const state = getState();
316 320
     const { isOpen: isChatOpen } = state['features/chat'];
317 321
 
318
-    if (!isChatOpen) {
322
+    if (shouldPlaySound && !isChatOpen) {
319 323
         dispatch(playSound(INCOMING_MSG_SOUND_ID));
320 324
     }
321 325
 

+ 11
- 11
react/features/reactions/constants.js Näytä tiedosto

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

Loading…
Peruuta
Tallenna