mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-28 10:22:38 +03:00
clean up
This commit is contained in:
parent
3dbba426f7
commit
bd1d124d9a
@ -33,6 +33,7 @@ public class MainActivity extends ReactActivity {
|
||||
setIntent(intent);
|
||||
}
|
||||
|
||||
//native side reference: https://github.com/facebook/react-native/issues/28823#issuecomment-642032481
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
|
@ -92,11 +92,11 @@ class SettingsContainer extends Component {
|
||||
}),
|
||||
);
|
||||
|
||||
getTheme().then((themeSetting)=>{
|
||||
getTheme().then((themeSetting) => {
|
||||
this.setState({
|
||||
themeSetting
|
||||
})
|
||||
})
|
||||
themeSetting,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Component Functions
|
||||
@ -126,15 +126,12 @@ class SettingsContainer extends Component {
|
||||
let setting = THEME_OPTIONS[action].value;
|
||||
const systemTheme = Appearance.getColorScheme();
|
||||
|
||||
dispatch(isDarkTheme(setting === null
|
||||
? systemTheme === 'dark'
|
||||
: setting
|
||||
));
|
||||
|
||||
dispatch(isDarkTheme(setting === null ? systemTheme === 'dark' : setting));
|
||||
|
||||
setTheme(setting);
|
||||
this.setState({
|
||||
themeSetting:setting
|
||||
})
|
||||
themeSetting: setting,
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -129,7 +129,7 @@ const SettingsScreen = ({
|
||||
id: item.key,
|
||||
}),
|
||||
)}
|
||||
selectedOptionIndex={THEME_OPTIONS.findIndex(item=>item.value===themeSetting)}
|
||||
selectedOptionIndex={THEME_OPTIONS.findIndex((item) => item.value === themeSetting)}
|
||||
handleOnChange={handleOnChange}
|
||||
/>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user