Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(subtitles) web components must not be used in generic action files

Saúl Ibarra Corretgé5502601fb3ae
diff --git a/react/features/subtitles/actions.js b/react/features/subtitles/actions.any.js
similarity index 86%
rename from react/features/subtitles/actions.js
rename to react/features/subtitles/actions.any.js
index ac6f7b56f8..5aaaaa6c79 100644
--- a/react/features/subtitles/actions.js
+++ b/react/features/subtitles/actions.any.js
@@ -1,7 +1,5 @@
// @flow
-import { toggleDialog } from '../base/dialog';
-
import {
ENDPOINT_MESSAGE_RECEIVED,
REMOVE_TRANSCRIPT_MESSAGE,
@@ -10,7 +8,6 @@ import {
UPDATE_TRANSCRIPT_MESSAGE,
UPDATE_TRANSLATION_LANGUAGE
} from './actionTypes';
-import LanguageSelectorDialogWeb from './components/LanguageSelectorDialog.web';
/**
* Signals that a participant sent an endpoint message on the data channel.
@@ -111,16 +108,3 @@ export function updateTranslationLanguage(value) {
value
};
}
-
-/**
- * Signals that the local user has toggled the LanguageSelector button.
- *
- * @returns {{
- * type: UPDATE_TRANSLATION_LANGUAGE
- * }}
- */
-export function toggleLangugeSelectorDialog() {
- return function(dispatch: (Object) => Object) {
- dispatch(toggleDialog(LanguageSelectorDialogWeb));
- };
-}
diff --git a/react/features/subtitles/actions.native.js b/react/features/subtitles/actions.native.js
new file mode 100644
index 0000000000..02b37d475d
--- /dev/null
+++ b/react/features/subtitles/actions.native.js
@@ -0,0 +1 @@
+export * from './actions.any';
diff --git a/react/features/subtitles/actions.web.js b/react/features/subtitles/actions.web.js
new file mode 100644
index 0000000000..d062924284
--- /dev/null
+++ b/react/features/subtitles/actions.web.js
@@ -0,0 +1,18 @@
+import { toggleDialog } from '../base/dialog/actions';
+
+import LanguageSelectorDialogWeb from './components/LanguageSelectorDialog.web';
+
+export * from './actions.any';
+
+/**
+ * Signals that the local user has toggled the LanguageSelector button.
+ *
+ * @returns {{
+ * type: UPDATE_TRANSLATION_LANGUAGE
+ * }}
+ */
+export function toggleLangugeSelectorDialog() {
+ return function(dispatch: (Object) => Object) {
+ dispatch(toggleDialog(LanguageSelectorDialogWeb));
+ };
+}