mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 12:51:42 +03:00
Merge pull request #2282 from ecency/nt/theme-chage-fix
added work around for iOS bug of colorScheme change on app resume
This commit is contained in:
commit
a1d9f5415d
@ -271,9 +271,11 @@ class ApplicationContainer extends Component {
|
||||
};
|
||||
|
||||
//change app theme on the fly
|
||||
_appearanceChangeListener = ({ colorScheme }) => {
|
||||
console.log('OS color scheme changed', colorScheme);
|
||||
_appearanceChangeListener = () => {
|
||||
const { dispatch } = this.props;
|
||||
|
||||
//workaround for bug with Appearece package: https://github.com/facebook/react-native/issues/28525#issuecomment-841812810
|
||||
const colorScheme = Appearance.getColorScheme();
|
||||
getTheme().then((darkThemeSetting) => {
|
||||
if (darkThemeSetting === null) {
|
||||
dispatch(isDarkTheme(colorScheme === 'dark'));
|
||||
|
Loading…
Reference in New Issue
Block a user