diff --git a/app/views/DisplayPrefsView.tsx b/app/views/DisplayPrefsView.tsx index 959682c4..c04d6c25 100644 --- a/app/views/DisplayPrefsView.tsx +++ b/app/views/DisplayPrefsView.tsx @@ -1,31 +1,23 @@ +import { StackNavigationProp } from '@react-navigation/stack'; import React, { useEffect } from 'react'; import { Switch } from 'react-native'; import { RadioButton } from 'react-native-ui-lib'; -import { StackNavigationProp } from '@react-navigation/stack'; import { useDispatch, useSelector } from 'react-redux'; import { setPreference } from '../actions/sortPreferences'; -import RocketChat from '../lib/rocketchat'; -import StatusBar from '../containers/StatusBar'; -import I18n from '../i18n'; -import * as List from '../containers/List'; -import { useTheme } from '../theme'; import { themes } from '../constants/colors'; -import * as HeaderButton from '../containers/HeaderButton'; -import SafeAreaView from '../containers/SafeAreaView'; -import { ICON_SIZE } from '../containers/List/constants'; -import log, { events, logEvent } from '../utils/log'; import { DisplayMode, SortBy } from '../constants/constantDisplayMode'; +import * as HeaderButton from '../containers/HeaderButton'; +import * as List from '../containers/List'; +import { ICON_SIZE } from '../containers/List/constants'; +import SafeAreaView from '../containers/SafeAreaView'; +import StatusBar from '../containers/StatusBar'; +import { IPreferences } from '../definitions'; +import I18n from '../i18n'; +import RocketChat from '../lib/rocketchat'; import { SettingsStackParamList } from '../stacks/types'; - -interface IParam { - sortBy: SortBy; - groupByType: boolean; - showFavorites: boolean; - showUnread: boolean; - showAvatar: boolean; - displayMode: DisplayMode; -} +import { useTheme } from '../theme'; +import log, { events, logEvent } from '../utils/log'; interface IDisplayPrefsView { navigation: StackNavigationProp; @@ -53,7 +45,7 @@ const DisplayPrefsView = (props: IDisplayPrefsView): JSX.Element => { } }, []); - const setSortPreference = async (param: Partial) => { + const setSortPreference = async (param: Partial) => { try { dispatch(setPreference(param)); await RocketChat.saveSortPreference(param);