Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(native) Move function to web file (#13014)
Robert Pintilii164d30552843
diff --git a/react/features/settings/functions.any.ts b/react/features/settings/functions.any.tsindex 33445ad9a6..5cbf3129e2 100644--- a/react/features/settings/functions.any.ts+++ b/react/features/settings/functions.any.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.diff --git a/react/features/settings/functions.native.ts b/react/features/settings/functions.native.tsindex fb2a6bc39a..f4320446fc 100644--- a/react/features/settings/functions.native.ts+++ b/react/features/settings/functions.native.ts@@ -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+ };+}diff --git a/react/features/settings/functions.web.ts b/react/features/settings/functions.web.tsindex a3b4094803..8781ab2163 100644--- a/react/features/settings/functions.web.ts+++ b/react/features/settings/functions.web.ts@@ -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()+ };+}