[IMPROVE] Set native theme when launching the app (#4365)

This commit is contained in:
Gleidson Daniel Silva 2022-07-15 13:39:07 -03:00 committed by GitHub
parent 90c1b0a97f
commit 08c368c41e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -28,7 +28,14 @@ import { ThemeContext, TSupportedThemes } from './theme';
import { debounce, isTablet } from './lib/methods/helpers'; import { debounce, isTablet } from './lib/methods/helpers';
import EventEmitter from './lib/methods/helpers/events'; import EventEmitter from './lib/methods/helpers/events';
import { toggleAnalyticsEventsReport, toggleCrashErrorsReport } from './lib/methods/helpers/log'; import { toggleAnalyticsEventsReport, toggleCrashErrorsReport } from './lib/methods/helpers/log';
import { getTheme, initialTheme, newThemeState, subscribeTheme, unsubscribeTheme } from './lib/methods/helpers/theme'; import {
getTheme,
initialTheme,
newThemeState,
setNativeTheme,
subscribeTheme,
unsubscribeTheme
} from './lib/methods/helpers/theme';
import ChangePasscodeView from './views/ChangePasscodeView'; import ChangePasscodeView from './views/ChangePasscodeView';
import ScreenLockedView from './views/ScreenLockedView'; import ScreenLockedView from './views/ScreenLockedView';
@ -98,6 +105,7 @@ export default class Root extends React.Component<{}, IState> {
if (isTablet) { if (isTablet) {
this.initTablet(); this.initTablet();
} }
setNativeTheme(theme);
} }
componentDidMount() { componentDidMount() {