fix(UI) removed unused methods

This commit is contained in:
Calinteodor 2021-04-24 16:14:07 +03:00 committed by GitHub
parent b536aa035c
commit f377455069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 72 deletions

View File

@ -25,7 +25,10 @@ import {
} from '../../react/features/base/participants';
import { updateSettings } from '../../react/features/base/settings';
import { isToggleCameraEnabled, toggleCamera } from '../../react/features/base/tracks';
import { setPrivateMessageRecipient } from '../../react/features/chat/actions';
import {
setPrivateMessageRecipient,
toggleChat
} from '../../react/features/chat/actions';
import { openChat } from '../../react/features/chat/actions.web';
import {
processExternalDeviceRequest
@ -186,7 +189,7 @@ function initCommands() {
},
'toggle-chat': () => {
sendAnalytics(createApiEvent('chat.toggled'));
APP.UI.toggleChat();
APP.store.dispatch(toggleChat());
},
'toggle-raise-hand': () => {
const localParticipant = getLocalParticipant(APP.store.getState());
@ -386,7 +389,7 @@ function initCommands() {
const { isOpen: isChatOpen } = state['features/chat'];
if (!isChatOpen) {
APP.UI.toggleChat();
APP.store.dispatch(toggleChat());
}
APP.store.dispatch(openChat(participant));
} else {

View File

@ -8,7 +8,6 @@ import Logger from 'jitsi-meet-logger';
import { isMobileBrowser } from '../../react/features/base/environment/utils';
import { setColorAlpha } from '../../react/features/base/util';
import { toggleChat } from '../../react/features/chat';
import { setDocumentUrl } from '../../react/features/etherpad';
import { setFilmstripVisible } from '../../react/features/filmstrip';
import { joinLeaveNotificationsDisabled, setNotificationsEnabled } from '../../react/features/notifications';
@ -98,14 +97,6 @@ UI.initConference = function() {
UI.showToolbar();
};
/**
* Returns the shared document manager object.
* @return {EtherpadManager} the shared document manager object
*/
UI.getSharedVideoManager = function() {
return sharedVideoManager;
};
/**
* Starts the UI module and initializes all related components.
*
@ -259,11 +250,6 @@ UI.toggleFilmstrip = function() {
APP.store.dispatch(setFilmstripVisible(!visible));
};
/**
* Toggles the visibility of the chat panel.
*/
UI.toggleChat = () => APP.store.dispatch(toggleChat());
/**
* Sets muted audio state for participant
*/
@ -306,16 +292,6 @@ UI.removeAllListeners = function() {
eventEmitter.removeAllListeners();
};
/**
* Removes the given listener for the given type of event.
*
* @param type the type of the event we're listening for
* @param listener the listener we want to remove
*/
UI.removeListener = function(type, listener) {
eventEmitter.removeListener(type, listener);
};
/**
* Emits the event of given type by specifying the parameters in options.
*

View File

@ -262,35 +262,6 @@ const messageHandler = {
};
},
/**
* Shows a dialog with different states to the user.
*
* @param statesObject object containing all the states of the dialog.
* @param options impromptu options
* @param translateOptions options passed to translation
*/
openDialogWithStates(statesObject, options, translateOptions) {
const { classes, size } = options;
const defaultClasses = this._getDialogClasses(size);
options.classes = Object.assign({}, defaultClasses, classes);
options.promptspeed = options.promptspeed || 0;
for (const state in statesObject) { // eslint-disable-line guard-for-in
const currentState = statesObject[state];
if (currentState.titleKey) {
currentState.title
= this._getFormattedTitleString(currentState.titleKey);
}
}
const dialog = $.prompt(statesObject, options);
APP.translation.translateElement(dialog, translateOptions);
return $.prompt.getApi();
},
/**
* Opens new popup window for given <tt>url</tt> centered over current
* window.
@ -370,22 +341,6 @@ const messageHandler = {
title: displayName
},
timeout));
},
/**
* Displays a notification.
*
* @param {string} titleKey - The key from the language file for the title
* of the notification.
* @param {string} messageKey - The key from the language file for the text
* of the message.
* @param {Object} messageArguments - The arguments for the message
* translation.
* @returns {void}
*/
notify(titleKey, messageKey, messageArguments) {
this.participantNotification(
null, titleKey, null, messageKey, messageArguments);
}
};