Pārlūkot izejas kodu

fix(UI) removed unused methods

master
Calinteodor 4 gadus atpakaļ
vecāks
revīzija
f377455069
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
3 mainītis faili ar 6 papildinājumiem un 72 dzēšanām
  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 Parādīt failu

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

+ 0
- 24
modules/UI/UI.js Parādīt failu

@@ -8,7 +8,6 @@ import Logger from 'jitsi-meet-logger';
8 8
 
9 9
 import { isMobileBrowser } from '../../react/features/base/environment/utils';
10 10
 import { setColorAlpha } from '../../react/features/base/util';
11
-import { toggleChat } from '../../react/features/chat';
12 11
 import { setDocumentUrl } from '../../react/features/etherpad';
13 12
 import { setFilmstripVisible } from '../../react/features/filmstrip';
14 13
 import { joinLeaveNotificationsDisabled, setNotificationsEnabled } from '../../react/features/notifications';
@@ -98,14 +97,6 @@ UI.initConference = function() {
98 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 101
  * Starts the UI module and initializes all related components.
111 102
  *
@@ -259,11 +250,6 @@ UI.toggleFilmstrip = function() {
259 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 254
  * Sets muted audio state for participant
269 255
  */
@@ -306,16 +292,6 @@ UI.removeAllListeners = function() {
306 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 296
  * Emits the event of given type by specifying the parameters in options.
321 297
  *

+ 0
- 45
modules/UI/util/MessageHandler.js Parādīt failu

@@ -262,35 +262,6 @@ const messageHandler = {
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 266
      * Opens new popup window for given <tt>url</tt> centered over current
296 267
      * window.
@@ -370,22 +341,6 @@ const messageHandler = {
370 341
             title: displayName
371 342
         },
372 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
 

Notiek ielāde…
Atcelt
Saglabāt