Skip to content

Commit

Permalink
[FIX] Display prefs showing wrong header icon on tablet (RocketChat#3510
Browse files Browse the repository at this point in the history
)
  • Loading branch information
diegolmello authored Nov 22, 2021
1 parent f4a2b1a commit 8ddd1cc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/views/DisplayPrefsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 8ddd1cc

Please sign in to comment.