[FIX] User Preferences (#2418)
* [FIX] User Preferences * PreferencesView -> UserPreferencesView Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
ccb36f1f56
commit
7813ed3b28
|
@ -34,6 +34,8 @@ import QueueListView from '../views/QueueListView';
|
||||||
|
|
||||||
// Profile Stack
|
// Profile Stack
|
||||||
import ProfileView from '../views/ProfileView';
|
import ProfileView from '../views/ProfileView';
|
||||||
|
import UserPreferencesView from '../views/UserPreferencesView';
|
||||||
|
import UserNotificationPrefView from '../views/UserNotificationPreferencesView';
|
||||||
|
|
||||||
// Settings Stack
|
// Settings Stack
|
||||||
import SettingsView from '../views/SettingsView';
|
import SettingsView from '../views/SettingsView';
|
||||||
|
@ -41,8 +43,6 @@ import LanguageView from '../views/LanguageView';
|
||||||
import ThemeView from '../views/ThemeView';
|
import ThemeView from '../views/ThemeView';
|
||||||
import DefaultBrowserView from '../views/DefaultBrowserView';
|
import DefaultBrowserView from '../views/DefaultBrowserView';
|
||||||
import ScreenLockConfigView from '../views/ScreenLockConfigView';
|
import ScreenLockConfigView from '../views/ScreenLockConfigView';
|
||||||
import PreferencesView from '../views/PreferencesView';
|
|
||||||
import UserNotificationPrefView from '../views/UserNotificationPreferencesView';
|
|
||||||
|
|
||||||
// Admin Stack
|
// Admin Stack
|
||||||
import AdminPanelView from '../views/AdminPanelView';
|
import AdminPanelView from '../views/AdminPanelView';
|
||||||
|
@ -186,6 +186,21 @@ const ProfileStackNavigator = () => {
|
||||||
component={ProfileView}
|
component={ProfileView}
|
||||||
options={ProfileView.navigationOptions}
|
options={ProfileView.navigationOptions}
|
||||||
/>
|
/>
|
||||||
|
<ProfileStack.Screen
|
||||||
|
name='UserPreferencesView'
|
||||||
|
component={UserPreferencesView}
|
||||||
|
options={UserPreferencesView.navigationOptions}
|
||||||
|
/>
|
||||||
|
<ProfileStack.Screen
|
||||||
|
name='UserNotificationPrefView'
|
||||||
|
component={UserNotificationPrefView}
|
||||||
|
options={UserNotificationPrefView.navigationOptions}
|
||||||
|
/>
|
||||||
|
<ProfileStack.Screen
|
||||||
|
name='PickerView'
|
||||||
|
component={PickerView}
|
||||||
|
options={PickerView.navigationOptions}
|
||||||
|
/>
|
||||||
</ProfileStack.Navigator>
|
</ProfileStack.Navigator>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -222,21 +237,6 @@ const SettingsStackNavigator = () => {
|
||||||
component={ScreenLockConfigView}
|
component={ScreenLockConfigView}
|
||||||
options={ScreenLockConfigView.navigationOptions}
|
options={ScreenLockConfigView.navigationOptions}
|
||||||
/>
|
/>
|
||||||
<SettingsStack.Screen
|
|
||||||
name='PreferencesView'
|
|
||||||
component={PreferencesView}
|
|
||||||
options={PreferencesView.navigationOptions}
|
|
||||||
/>
|
|
||||||
<SettingsStack.Screen
|
|
||||||
name='UserNotificationPrefView'
|
|
||||||
component={UserNotificationPrefView}
|
|
||||||
options={UserNotificationPrefView.navigationOptions}
|
|
||||||
/>
|
|
||||||
<SettingsStack.Screen
|
|
||||||
name='PickerView'
|
|
||||||
component={PickerView}
|
|
||||||
options={PickerView.navigationOptions}
|
|
||||||
/>
|
|
||||||
</SettingsStack.Navigator>
|
</SettingsStack.Navigator>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,7 +42,7 @@ import AdminPanelView from '../../views/AdminPanelView';
|
||||||
import NewMessageView from '../../views/NewMessageView';
|
import NewMessageView from '../../views/NewMessageView';
|
||||||
import CreateChannelView from '../../views/CreateChannelView';
|
import CreateChannelView from '../../views/CreateChannelView';
|
||||||
import QueueListView from '../../views/QueueListView';
|
import QueueListView from '../../views/QueueListView';
|
||||||
import PreferencesView from '../../views/PreferencesView';
|
import UserPreferencesView from '../../views/UserPreferencesView';
|
||||||
import UserNotificationPrefView from '../../views/UserNotificationPreferencesView';
|
import UserNotificationPrefView from '../../views/UserNotificationPreferencesView';
|
||||||
|
|
||||||
// InsideStackNavigator
|
// InsideStackNavigator
|
||||||
|
@ -256,9 +256,9 @@ const ModalStackNavigator = React.memo(({ navigation }) => {
|
||||||
component={CreateDiscussionView}
|
component={CreateDiscussionView}
|
||||||
/>
|
/>
|
||||||
<ModalStack.Screen
|
<ModalStack.Screen
|
||||||
name='PreferencesView'
|
name='UserPreferencesView'
|
||||||
component={PreferencesView}
|
component={UserPreferencesView}
|
||||||
options={PreferencesView.navigationOptions}
|
options={UserPreferencesView.navigationOptions}
|
||||||
/>
|
/>
|
||||||
<ModalStack.Screen
|
<ModalStack.Screen
|
||||||
name='UserNotificationPrefView'
|
name='UserNotificationPrefView'
|
||||||
|
|
|
@ -40,7 +40,7 @@ class ProfileView extends React.Component {
|
||||||
options.headerLeft = () => <DrawerButton navigation={navigation} />;
|
options.headerLeft = () => <DrawerButton navigation={navigation} />;
|
||||||
}
|
}
|
||||||
options.headerRight = () => (
|
options.headerRight = () => (
|
||||||
<PreferencesButton onPress={() => navigation.navigate('PreferencesView')} testID='preferences-view-open' />
|
<PreferencesButton onPress={() => navigation.navigate('UserPreferencesView')} testID='preferences-view-open' />
|
||||||
);
|
);
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ import ListItem from '../../containers/ListItem';
|
||||||
import { DisclosureImage } from '../../containers/DisclosureIndicator';
|
import { DisclosureImage } from '../../containers/DisclosureIndicator';
|
||||||
import { withTheme } from '../../theme';
|
import { withTheme } from '../../theme';
|
||||||
|
|
||||||
class PreferencesView extends React.Component {
|
class UserPreferencesView extends React.Component {
|
||||||
static navigationOptions = () => ({
|
static navigationOptions = () => ({
|
||||||
title: I18n.t('Preferences')
|
title: I18n.t('Preferences')
|
||||||
});
|
});
|
||||||
|
@ -62,4 +62,4 @@ class PreferencesView extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default withTheme(PreferencesView);
|
export default withTheme(UserPreferencesView);
|
Loading…
Reference in New Issue