* Add autotranslations
* Develop latest changes and missing features
* i18n-extract
* Fix tests and update api behavior
* Fix minor bugs
* adjustments to shimmer animation, showtranslation modal style
* Update post.tsx
* Update show_translation.tsx
* adjust sizing and opacity of translate icon
* Add channel header translated icon
* Disable auto translation item if it is not a supported language
* Move channel info to the top
* Update edit channel to channel info
* Fix align of option items
* Fix i18n
* Add detox related changes for channel settings changes
* Add tests
* Address changes around the my channel column change
* Address feedback
* Fix test
* Fix bad import
* Fix set my channel autotranslation
* Fix test
* Address feedback
* Add missing files from last commit
* Remove unneeded change
---------
(cherry picked from commit 23565b5135)
Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
66 lines
2.3 KiB
TypeScript
66 lines
2.3 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {RUNNING_E2E} from '@env';
|
|
import TurboLogger from '@mattermost/react-native-turbo-log';
|
|
import {LogBox, Platform, UIManager} from 'react-native';
|
|
import ViewReactNativeStyleAttributes from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';
|
|
import 'react-native-gesture-handler';
|
|
import {Navigation} from 'react-native-navigation';
|
|
|
|
import {start} from './app/init/app';
|
|
import setFontFamily from './app/utils/font_family';
|
|
import {logInfo} from './app/utils/log';
|
|
|
|
declare const global: { HermesInternal: null | {} };
|
|
|
|
// Add scaleY back to work around its removal in React Native 0.70.
|
|
ViewReactNativeStyleAttributes.scaleY = true;
|
|
|
|
TurboLogger.configure({
|
|
dailyRolling: false,
|
|
logToFile: !__DEV__,
|
|
maximumFileSize: 1024 * 1024,
|
|
maximumNumberOfFiles: 2,
|
|
});
|
|
|
|
if (__DEV__) {
|
|
LogBox.ignoreLogs([
|
|
'new NativeEventEmitter',
|
|
]);
|
|
|
|
// Ignore all notifications if running e2e
|
|
const isRunningE2e = RUNNING_E2E === 'true';
|
|
logInfo(`RUNNING_E2E: ${RUNNING_E2E}, isRunningE2e: ${isRunningE2e}`);
|
|
if (isRunningE2e) {
|
|
LogBox.ignoreAllLogs(true);
|
|
}
|
|
}
|
|
|
|
setFontFamily();
|
|
|
|
if (global.HermesInternal) {
|
|
// Polyfills required to use Intl with Hermes engine
|
|
require('@formatjs/intl-getcanonicallocales/polyfill-force');
|
|
require('@formatjs/intl-locale/polyfill-force');
|
|
require('@formatjs/intl-pluralrules/polyfill-force');
|
|
require('@formatjs/intl-numberformat/polyfill-force');
|
|
require('@formatjs/intl-datetimeformat/polyfill-force');
|
|
require('@formatjs/intl-datetimeformat/add-all-tz');
|
|
require('@formatjs/intl-listformat/polyfill-force');
|
|
require('@formatjs/intl-relativetimeformat/polyfill-force');
|
|
require('@formatjs/intl-displaynames/polyfill-force');
|
|
}
|
|
|
|
if (Platform.OS === 'android') {
|
|
const ShareExtension = require('share_extension/index.tsx').default;
|
|
const AppRegistry = require('react-native/Libraries/ReactNative/AppRegistry');
|
|
AppRegistry.registerComponent('MattermostShare', () => ShareExtension);
|
|
if (UIManager.setLayoutAnimationEnabledExperimental) {
|
|
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
}
|
|
}
|
|
|
|
Navigation.events().registerAppLaunchedListener(async () => {
|
|
start();
|
|
});
|