mirror of https://github.com/jitsi/jitsi-meet
parent
410dc132e1
commit
112c856850
@ -1,29 +1,29 @@ |
||||
/* @flow */ |
||||
// @flow
|
||||
|
||||
import { HIDE_APP_SETTINGS, SHOW_APP_SETTINGS } from './actionTypes'; |
||||
|
||||
/** |
||||
* Redux-signals the request to open the app settings modal. |
||||
* |
||||
* @returns {{ |
||||
* type: SHOW_APP_SETTINGS |
||||
* }} |
||||
*/ |
||||
export function showAppSettings() { |
||||
* Redux-signals the request to hide the app settings modal. |
||||
* |
||||
* @returns {{ |
||||
* type: HIDE_APP_SETTINGS |
||||
* }} |
||||
*/ |
||||
export function hideAppSettings() { |
||||
return { |
||||
type: SHOW_APP_SETTINGS |
||||
type: HIDE_APP_SETTINGS |
||||
}; |
||||
} |
||||
|
||||
/** |
||||
* Redux-signals the request to hide the app settings modal. |
||||
* |
||||
* @returns {{ |
||||
* type: HIDE_APP_SETTINGS |
||||
* }} |
||||
*/ |
||||
export function hideAppSettings() { |
||||
* Redux-signals the request to open the app settings modal. |
||||
* |
||||
* @returns {{ |
||||
* type: SHOW_APP_SETTINGS |
||||
* }} |
||||
*/ |
||||
export function showAppSettings() { |
||||
return { |
||||
type: HIDE_APP_SETTINGS |
||||
type: SHOW_APP_SETTINGS |
||||
}; |
||||
} |
||||
|
@ -1,37 +1,35 @@ |
||||
// @flow
|
||||
|
||||
import { Dimensions } from 'react-native'; |
||||
|
||||
import Platform from './Platform'; |
||||
|
||||
const IPHONEX_HEIGHT = 812; |
||||
const IPHONEX_WIDTH = 375; |
||||
|
||||
/** |
||||
* Determines if the device is an iPad or not. |
||||
* |
||||
* @returns {boolean} |
||||
*/ |
||||
* Determines if the device is an iPad or not. |
||||
* |
||||
* @returns {boolean} |
||||
*/ |
||||
export function isIPad() { |
||||
const { height, width } = Dimensions.get('window'); |
||||
|
||||
return Platform.OS === 'ios' && ( |
||||
Math.max(height, width) |
||||
/ Math.min(height, width)) < 1.6; |
||||
return ( |
||||
Platform.OS === 'ios' |
||||
&& (Math.max(height, width) / Math.min(height, width)) < 1.6); |
||||
} |
||||
|
||||
/** |
||||
* Determines if it's an iPhone X or not. |
||||
* |
||||
* @returns {boolean} |
||||
*/ |
||||
* Determines if it's an iPhone X or not. |
||||
* |
||||
* @returns {boolean} |
||||
*/ |
||||
export function isIPhoneX() { |
||||
const { height, width } = Dimensions.get('window'); |
||||
|
||||
return ( |
||||
Platform.OS === 'ios' |
||||
&& ((height === IPHONEX_HEIGHT |
||||
&& width === IPHONEX_WIDTH) |
||||
|| (height === IPHONEX_WIDTH |
||||
&& width === IPHONEX_HEIGHT)) |
||||
); |
||||
&& ((height === IPHONEX_HEIGHT && width === IPHONEX_WIDTH) |
||||
|| (height === IPHONEX_WIDTH && width === IPHONEX_HEIGHT))); |
||||
} |
||||
|
Loading…
Reference in new issue