Unverified Commit 010d8853 authored by Diego Mello's avatar Diego Mello Committed by GitHub
Browse files

[FIX] Display prefs showing wrong header icon on tablet (#3510)

parent 1ec4046a
......@@ -21,19 +21,19 @@ const DisplayPrefsView = props => {
const { theme } = useTheme();
const { sortBy, groupByType, showFavorites, showUnread, showAvatar, displayMode } = useSelector(state => state.sortPreferences);
const { isMasterDetail } = useSelector(state => state.app);
const dispatch = useDispatch();
useEffect(() => {
const { navigation, isMasterDetail } = props;
const { navigation } = props;
navigation.setOptions({
title: I18n.t('Display'),
headerLeft: () =>
isMasterDetail ? (
<HeaderButton.CloseModal navigation={navigation} testID='display-view-close' />
) : (
<HeaderButton.Drawer navigation={navigation} testID='display-view-drawer' />
)
title: I18n.t('Display')
});
if (!isMasterDetail) {
navigation.setOptions({
headerLeft: () => <HeaderButton.Drawer navigation={navigation} testID='display-view-drawer' />
});
}
}, []);
const setSortPreference = async param => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment