Skip to content

Commit

Permalink
changed night mode to dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
aritroCoder committed Dec 8, 2022
1 parent aef0f3f commit 81113f2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/reduxTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ export type ThemeName = 'light' | 'dark';
* To determine the actual theme to show the user, use a ThemeName;
* see there for details.
*/
export type ThemeSetting = 'default' | 'night';
export type ThemeSetting = 'default' | 'dark';

/** What browser the user has set to use for opening links in messages.
*
Expand Down
4 changes: 2 additions & 2 deletions src/settings/SettingsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export default function SettingsScreen(props: Props): Node {
const { navigation } = props;

const handleThemeChange = useCallback(() => {
dispatch(setGlobalSettings({ theme: theme === 'default' ? 'night' : 'default' }));
dispatch(setGlobalSettings({ theme: theme === 'default' ? 'dark' : 'default' }));
}, [theme, dispatch]);

return (
<Screen title="Settings">
<SwitchRow label="Dark theme" value={theme === 'night'} onValueChange={handleThemeChange} />
<SwitchRow label="Dark theme" value={theme === 'dark'} onValueChange={handleThemeChange} />
<SwitchRow
label="Open links with in-app browser"
value={shouldUseInAppBrowser(browser)}
Expand Down
4 changes: 2 additions & 2 deletions src/settings/__tests__/settingsReducer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ describe('settingsReducer', () => {
test('changes value of a key', () => {
const action = deepFreeze({
type: SET_GLOBAL_SETTINGS,
update: { theme: 'night' },
update: { theme: 'dark' },
});

const expectedState = {
...baseState,
theme: 'night',
theme: 'dark',
};

const actualState = settingsReducer(baseState, action);
Expand Down

0 comments on commit 81113f2

Please sign in to comment.