forked from jitsi/jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.js
38 lines (36 loc) · 1.27 KB
/
functions.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { getName } from '../app';
import { translateToHTML } from '../base/i18n';
import { browser } from '../base/lib-jitsi-meet';
import { showWarningNotification } from '../notifications';
/**
* Shows the suboptimal experience notification if needed.
*
* @param {Function} dispatch - The dispatch method.
* @param {Function} t - The translation function.
* @returns {void}
*/
export function maybeShowSuboptimalExperienceNotification(dispatch, t) {
if (!browser.isChrome()
&& !browser.isFirefox()
&& !browser.isNWJS()
&& !browser.isElectron()
// Adding react native to the list of recommended browsers is not
// necessary for now because the function won't be executed at all
// in this case but I'm adding it for completeness.
&& !browser.isReactNative()
) {
dispatch(
showWarningNotification(
{
titleKey: 'notify.suboptimalExperienceTitle',
description: translateToHTML(
t,
'notify.suboptimalExperienceDescription',
{
appName: getName()
})
}
)
);
}
}