Преглед изворни кода

fix(visitors) remove default notification (#14970)

factor2
Mihaela Dumitru пре 1 година
родитељ
комит
1c12f5cf2a
No account linked to committer's email address
2 измењених фајлова са 13 додато и 14 уклоњено
  1. 0
    1
      lang/main.json
  2. 13
    13
      react/features/visitors/middleware.ts

+ 0
- 1
lang/main.json Прегледај датотеку

1503
         "labelTooltip": "Number of visitors: {{count}}",
1503
         "labelTooltip": "Number of visitors: {{count}}",
1504
         "notification": {
1504
         "notification": {
1505
             "demoteDescription": "Sent here by {{actor}}, raise your hand to participate",
1505
             "demoteDescription": "Sent here by {{actor}}, raise your hand to participate",
1506
-            "description": "To participate raise your hand",
1507
             "noMainParticipantsDescription": "A participant needs to start the meeting. Please try again in a bit.",
1506
             "noMainParticipantsDescription": "A participant needs to start the meeting. Please try again in a bit.",
1508
             "noMainParticipantsTitle": "This meeting hasn’t started yet.",
1507
             "noMainParticipantsTitle": "This meeting hasn’t started yet.",
1509
             "noVisitorLobby": "You cannot join while there is a lobby enabled for the meeting.",
1508
             "noVisitorLobby": "You cannot join while there is a lobby enabled for the meeting.",

+ 13
- 13
react/features/visitors/middleware.ts Прегледај датотеку

72
         const { conference } = action;
72
         const { conference } = action;
73
 
73
 
74
         if (getState()['features/visitors'].iAmVisitor) {
74
         if (getState()['features/visitors'].iAmVisitor) {
75
-            dispatch(openDialog(JoinMeetingDialog));
76
 
75
 
77
             const { demoteActorDisplayName } = getState()['features/visitors'];
76
             const { demoteActorDisplayName } = getState()['features/visitors'];
78
 
77
 
79
-            dispatch(setVisitorDemoteActor(undefined));
80
-
81
-            const notificationParams: INotificationProps = {
82
-                titleKey: 'visitors.notification.title',
83
-                descriptionKey: 'visitors.notification.description'
84
-            };
85
-
86
             if (demoteActorDisplayName) {
78
             if (demoteActorDisplayName) {
87
-                notificationParams.descriptionKey = 'visitors.notification.demoteDescription';
88
-                notificationParams.descriptionArguments = {
89
-                    actor: demoteActorDisplayName
79
+                const notificationParams: INotificationProps = {
80
+                    titleKey: 'visitors.notification.title',
81
+                    descriptionKey: 'visitors.notification.demoteDescription',
82
+                    descriptionArguments: {
83
+                        actor: demoteActorDisplayName
84
+                    }
90
                 };
85
                 };
86
+
87
+                batch(() => {
88
+                    dispatch(showNotification(notificationParams, NOTIFICATION_TIMEOUT_TYPE.STICKY));
89
+                    dispatch(setVisitorDemoteActor(undefined));
90
+                });
91
+            } else {
92
+                dispatch(openDialog(JoinMeetingDialog));
91
             }
93
             }
92
 
94
 
93
-            // check for demote actor and update notification
94
-            dispatch(showNotification(notificationParams, NOTIFICATION_TIMEOUT_TYPE.STICKY));
95
         } else {
95
         } else {
96
             dispatch(setVisitorsSupported(conference.isVisitorsSupported()));
96
             dispatch(setVisitorsSupported(conference.isVisitorsSupported()));
97
             conference.on(JitsiConferenceEvents.VISITORS_SUPPORTED_CHANGED, (value: boolean) => {
97
             conference.on(JitsiConferenceEvents.VISITORS_SUPPORTED_CHANGED, (value: boolean) => {

Loading…
Откажи
Сачувај