Преглед на файлове

fix(UI) removed unused methods

master
Calinteodor преди 4 години
родител
ревизия
f377455069
No account linked to committer's email address
променени са 3 файла, в които са добавени 6 реда и са изтрити 72 реда
  1. 6
    3
      modules/API/API.js
  2. 0
    24
      modules/UI/UI.js
  3. 0
    45
      modules/UI/util/MessageHandler.js

+ 6
- 3
modules/API/API.js Целия файл

25
 } from '../../react/features/base/participants';
25
 } from '../../react/features/base/participants';
26
 import { updateSettings } from '../../react/features/base/settings';
26
 import { updateSettings } from '../../react/features/base/settings';
27
 import { isToggleCameraEnabled, toggleCamera } from '../../react/features/base/tracks';
27
 import { isToggleCameraEnabled, toggleCamera } from '../../react/features/base/tracks';
28
-import { setPrivateMessageRecipient } from '../../react/features/chat/actions';
28
+import {
29
+    setPrivateMessageRecipient,
30
+    toggleChat
31
+} from '../../react/features/chat/actions';
29
 import { openChat } from '../../react/features/chat/actions.web';
32
 import { openChat } from '../../react/features/chat/actions.web';
30
 import {
33
 import {
31
     processExternalDeviceRequest
34
     processExternalDeviceRequest
186
         },
189
         },
187
         'toggle-chat': () => {
190
         'toggle-chat': () => {
188
             sendAnalytics(createApiEvent('chat.toggled'));
191
             sendAnalytics(createApiEvent('chat.toggled'));
189
-            APP.UI.toggleChat();
192
+            APP.store.dispatch(toggleChat());
190
         },
193
         },
191
         'toggle-raise-hand': () => {
194
         'toggle-raise-hand': () => {
192
             const localParticipant = getLocalParticipant(APP.store.getState());
195
             const localParticipant = getLocalParticipant(APP.store.getState());
386
                 const { isOpen: isChatOpen } = state['features/chat'];
389
                 const { isOpen: isChatOpen } = state['features/chat'];
387
 
390
 
388
                 if (!isChatOpen) {
391
                 if (!isChatOpen) {
389
-                    APP.UI.toggleChat();
392
+                    APP.store.dispatch(toggleChat());
390
                 }
393
                 }
391
                 APP.store.dispatch(openChat(participant));
394
                 APP.store.dispatch(openChat(participant));
392
             } else {
395
             } else {

+ 0
- 24
modules/UI/UI.js Целия файл

8
 
8
 
9
 import { isMobileBrowser } from '../../react/features/base/environment/utils';
9
 import { isMobileBrowser } from '../../react/features/base/environment/utils';
10
 import { setColorAlpha } from '../../react/features/base/util';
10
 import { setColorAlpha } from '../../react/features/base/util';
11
-import { toggleChat } from '../../react/features/chat';
12
 import { setDocumentUrl } from '../../react/features/etherpad';
11
 import { setDocumentUrl } from '../../react/features/etherpad';
13
 import { setFilmstripVisible } from '../../react/features/filmstrip';
12
 import { setFilmstripVisible } from '../../react/features/filmstrip';
14
 import { joinLeaveNotificationsDisabled, setNotificationsEnabled } from '../../react/features/notifications';
13
 import { joinLeaveNotificationsDisabled, setNotificationsEnabled } from '../../react/features/notifications';
98
     UI.showToolbar();
97
     UI.showToolbar();
99
 };
98
 };
100
 
99
 
101
-/**
102
- * Returns the shared document manager object.
103
- * @return {EtherpadManager} the shared document manager object
104
- */
105
-UI.getSharedVideoManager = function() {
106
-    return sharedVideoManager;
107
-};
108
-
109
 /**
100
 /**
110
  * Starts the UI module and initializes all related components.
101
  * Starts the UI module and initializes all related components.
111
  *
102
  *
259
     APP.store.dispatch(setFilmstripVisible(!visible));
250
     APP.store.dispatch(setFilmstripVisible(!visible));
260
 };
251
 };
261
 
252
 
262
-/**
263
- * Toggles the visibility of the chat panel.
264
- */
265
-UI.toggleChat = () => APP.store.dispatch(toggleChat());
266
-
267
 /**
253
 /**
268
  * Sets muted audio state for participant
254
  * Sets muted audio state for participant
269
  */
255
  */
306
     eventEmitter.removeAllListeners();
292
     eventEmitter.removeAllListeners();
307
 };
293
 };
308
 
294
 
309
-/**
310
- * Removes the given listener for the given type of event.
311
- *
312
- * @param type the type of the event we're listening for
313
- * @param listener the listener we want to remove
314
- */
315
-UI.removeListener = function(type, listener) {
316
-    eventEmitter.removeListener(type, listener);
317
-};
318
-
319
 /**
295
 /**
320
  * Emits the event of given type by specifying the parameters in options.
296
  * Emits the event of given type by specifying the parameters in options.
321
  *
297
  *

+ 0
- 45
modules/UI/util/MessageHandler.js Целия файл

262
         };
262
         };
263
     },
263
     },
264
 
264
 
265
-    /**
266
-     * Shows a dialog with different states to the user.
267
-     *
268
-     * @param statesObject object containing all the states of the dialog.
269
-     * @param options impromptu options
270
-     * @param translateOptions options passed to translation
271
-     */
272
-    openDialogWithStates(statesObject, options, translateOptions) {
273
-        const { classes, size } = options;
274
-        const defaultClasses = this._getDialogClasses(size);
275
-
276
-        options.classes = Object.assign({}, defaultClasses, classes);
277
-        options.promptspeed = options.promptspeed || 0;
278
-
279
-        for (const state in statesObject) { // eslint-disable-line guard-for-in
280
-            const currentState = statesObject[state];
281
-
282
-            if (currentState.titleKey) {
283
-                currentState.title
284
-                    = this._getFormattedTitleString(currentState.titleKey);
285
-            }
286
-        }
287
-        const dialog = $.prompt(statesObject, options);
288
-
289
-        APP.translation.translateElement(dialog, translateOptions);
290
-
291
-        return $.prompt.getApi();
292
-    },
293
-
294
     /**
265
     /**
295
      * Opens new popup window for given <tt>url</tt> centered over current
266
      * Opens new popup window for given <tt>url</tt> centered over current
296
      * window.
267
      * window.
370
             title: displayName
341
             title: displayName
371
         },
342
         },
372
         timeout));
343
         timeout));
373
-    },
374
-
375
-    /**
376
-     * Displays a notification.
377
-     *
378
-     * @param {string} titleKey - The key from the language file for the title
379
-     * of the notification.
380
-     * @param {string} messageKey - The key from the language file for the text
381
-     * of the message.
382
-     * @param {Object} messageArguments - The arguments for the message
383
-     * translation.
384
-     * @returns {void}
385
-     */
386
-    notify(titleKey, messageKey, messageArguments) {
387
-        this.participantNotification(
388
-            null, titleKey, null, messageKey, messageArguments);
389
     }
344
     }
390
 };
345
 };
391
 
346
 

Loading…
Отказ
Запис