Skip to content

Commit ef8193d

Browse files
committed
Hide help panel on other languages
1 parent 247c88a commit ef8193d

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

src/hooks/useSidePane.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ function useSidePane() {
2727
const {windowWidth} = useWindowDimensions();
2828

2929
const [sidePane] = useOnyx(ONYXKEYS.NVP_SIDE_PANE);
30-
const isPaneHidden = isSidePaneHidden(sidePane, isExtraLargeScreenWidth);
30+
const [language] = useOnyx(ONYXKEYS.NVP_PREFERRED_LOCALE);
31+
const isPaneHidden = isSidePaneHidden(sidePane, isExtraLargeScreenWidth) || language !== CONST.LOCALES.EN;
3132

3233
const sidePaneWidth = shouldUseNarrowLayout ? windowWidth : variables.sideBarWidth;
3334
const shouldApplySidePaneOffset = isExtraLargeScreenWidth && !isPaneHidden;

src/libs/actions/App.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import {getAll, rollbackOngoingRequest, save} from './PersistedRequests';
3131
import {createDraftInitialWorkspace, createWorkspace, generatePolicyID} from './Policy/Policy';
3232
import {resolveDuplicationConflictAction} from './RequestConflictUtils';
3333
import {isAnonymousUser} from './Session';
34-
import {triggerSidePane} from './SidePane';
3534
import Timing from './Timing';
3635

3736
type PolicyParamsForOpenOrReconnect = {
@@ -115,14 +114,6 @@ Onyx.connect({
115114
},
116115
});
117116

118-
let nvpSidePane: OnyxEntry<OnyxTypes.SidePane>;
119-
Onyx.connect({
120-
key: ONYXKEYS.NVP_SIDE_PANE,
121-
callback: (value) => {
122-
nvpSidePane = value;
123-
},
124-
});
125-
126117
const KEYS_TO_PRESERVE: OnyxKey[] = [
127118
ONYXKEYS.ACCOUNT,
128119
ONYXKEYS.IS_CHECKING_PUBLIC_ROOM,
@@ -205,11 +196,6 @@ function setLocale(locale: Locale) {
205196

206197
function setLocaleAndNavigate(locale: Locale) {
207198
setLocale(locale);
208-
209-
if (nvpSidePane) {
210-
triggerSidePane(false, {shouldUpdateNarrowLayout: true});
211-
}
212-
213199
Navigation.goBack();
214200
}
215201

0 commit comments

Comments
 (0)