[FIX] Display prefs showing wrong header icon on tablet (#3510)
This commit is contained in:
parent
1ec4046a86
commit
010d88530c
|
@ -21,19 +21,19 @@ const DisplayPrefsView = props => {
|
||||||
const { theme } = useTheme();
|
const { theme } = useTheme();
|
||||||
|
|
||||||
const { sortBy, groupByType, showFavorites, showUnread, showAvatar, displayMode } = useSelector(state => state.sortPreferences);
|
const { sortBy, groupByType, showFavorites, showUnread, showAvatar, displayMode } = useSelector(state => state.sortPreferences);
|
||||||
|
const { isMasterDetail } = useSelector(state => state.app);
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const { navigation, isMasterDetail } = props;
|
const { navigation } = props;
|
||||||
navigation.setOptions({
|
navigation.setOptions({
|
||||||
title: I18n.t('Display'),
|
title: I18n.t('Display')
|
||||||
headerLeft: () =>
|
|
||||||
isMasterDetail ? (
|
|
||||||
<HeaderButton.CloseModal navigation={navigation} testID='display-view-close' />
|
|
||||||
) : (
|
|
||||||
<HeaderButton.Drawer navigation={navigation} testID='display-view-drawer' />
|
|
||||||
)
|
|
||||||
});
|
});
|
||||||
|
if (!isMasterDetail) {
|
||||||
|
navigation.setOptions({
|
||||||
|
headerLeft: () => <HeaderButton.Drawer navigation={navigation} testID='display-view-drawer' />
|
||||||
|
});
|
||||||
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const setSortPreference = async param => {
|
const setSortPreference = async param => {
|
||||||
|
|
Loading…
Reference in New Issue