fix(native) Move function to web file (#13014)

pull/13016/head jitsi-meet_8380
Robert Pintilii 2 years ago committed by GitHub
parent 183de81a57
commit 164d305528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      react/features/settings/functions.any.ts
  2. 17
      react/features/settings/functions.native.ts
  3. 25
      react/features/settings/functions.web.ts

@ -1,5 +1,3 @@
// @ts-expect-error
import keyboardShortcut from '../../../modules/keyboardshortcut/keyboardshortcut';
import { IReduxState } from '../app/types';
import { IStateful } from '../base/app/types';
import { isNameReadOnly } from '../base/config/functions';
@ -17,7 +15,6 @@ import { parseStandardURIString } from '../base/util/uri';
import { isStageFilmstripEnabled } from '../filmstrip/functions';
import { isFollowMeActive } from '../follow-me/functions';
import { getParticipantsPaneConfig } from '../participants-pane/functions';
import { isPrejoinPageVisible } from '../prejoin/functions';
import { isReactionsEnabled } from '../reactions/functions.any';
/**
@ -275,26 +272,6 @@ export function getVideoSettingsVisibility(state: IReduxState) {
return state['features/settings'].videoSettingsVisible;
}
/**
* Returns the properties for the "Shortcuts" tab from settings dialog from Redux
* state.
*
* @param {(Function|Object)} stateful -The (whole) redux state, or redux's
* {@code getState} function to be used to retrieve the state.
* @param {boolean} isDisplayedOnWelcomePage - Indicates whether the shortcuts dialog is displayed on the
* welcome page or not.
* @returns {Object} - The properties for the "Shortcuts" tab from settings
* dialog.
*/
export function getShortcutsTabProps(stateful: IStateful, isDisplayedOnWelcomePage?: boolean) {
const state = toState(stateful);
return {
displayShortcuts: !isDisplayedOnWelcomePage && !isPrejoinPageVisible(state),
keyboardShortcutsEnabled: keyboardShortcut.getEnabled()
};
}
/**
* Returns the properties for the "Virtual Background" tab from settings dialog from Redux
* state.

@ -1 +1,18 @@
export * from './functions.any';
/**
* Used on web.
*
* @param {(Function|Object)} _stateful -The (whole) redux state, or redux's
* {@code getState} function to be used to retrieve the state.
* @param {boolean} _isDisplayedOnWelcomePage - Indicates whether the shortcuts dialog is displayed on the
* welcome page or not.
* @returns {Object} - The properties for the "Shortcuts" tab from settings
* dialog.
*/
export function getShortcutsTabProps(_stateful: any, _isDisplayedOnWelcomePage?: boolean) {
// needed to fix lint error.
return {
keyboardShortcutsEnabled: false
};
}

@ -1,4 +1,9 @@
// @ts-expect-error
import keyboardShortcut from '../../../modules/keyboardshortcut/keyboardshortcut';
import { IStateful } from '../base/app/types';
import { createLocalTrack } from '../base/lib-jitsi-meet/functions';
import { toState } from '../base/redux/functions';
import { isPrejoinPageVisible } from '../prejoin/functions';
export * from './functions.any';
@ -62,3 +67,23 @@ export function createLocalAudioTracks(devices: Array<{ deviceId: string; label:
};
}));
}
/**
* Returns the properties for the "Shortcuts" tab from settings dialog from Redux
* state.
*
* @param {(Function|Object)} stateful -The (whole) redux state, or redux's
* {@code getState} function to be used to retrieve the state.
* @param {boolean} isDisplayedOnWelcomePage - Indicates whether the shortcuts dialog is displayed on the
* welcome page or not.
* @returns {Object} - The properties for the "Shortcuts" tab from settings
* dialog.
*/
export function getShortcutsTabProps(stateful: IStateful, isDisplayedOnWelcomePage?: boolean) {
const state = toState(stateful);
return {
displayShortcuts: !isDisplayedOnWelcomePage && !isPrejoinPageVisible(state),
keyboardShortcutsEnabled: keyboardShortcut.getEnabled()
};
}

Loading…
Cancel
Save