forked from Ivasoft/mattermost-mobile
28 lines
926 B
TypeScript
28 lines
926 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {Platform} from 'react-native';
|
|
import DeviceInfo from 'react-native-device-info';
|
|
import {FileSystem} from 'react-native-unimodules';
|
|
|
|
import keyMirror from '@utils/key_mirror';
|
|
|
|
const device = keyMirror({
|
|
CONNECTION_CHANGED: null,
|
|
DEVICE_DIMENSIONS_CHANGED: null,
|
|
DEVICE_TYPE_CHANGED: null,
|
|
DEVICE_ORIENTATION_CHANGED: null,
|
|
STATUSBAR_HEIGHT_CHANGED: null,
|
|
});
|
|
|
|
export default {
|
|
...device,
|
|
DOCUMENTS_PATH: `${FileSystem.cacheDirectory}/Documents`,
|
|
IMAGES_PATH: `${FileSystem.cacheDirectory}/Images`,
|
|
IS_IPHONE_WITH_INSETS: Platform.OS === 'ios' && DeviceInfo.hasNotch(),
|
|
IS_TABLET: DeviceInfo.isTablet(),
|
|
PUSH_NOTIFY_ANDROID_REACT_NATIVE: 'android_rn',
|
|
PUSH_NOTIFY_APPLE_REACT_NATIVE: 'apple_rn',
|
|
VIDEOS_PATH: `${FileSystem.cacheDirectory}/Videos`,
|
|
};
|