Skip to content

Commit e1af190

Browse files
authored
fix: default browser setting (#6929)
1 parent ef13690 commit e1af190

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/lib/methods/helpers/openLink.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ const appSchemeURL = (url: string, browser: string): string => {
2323
const { protocol } = parsedUrl;
2424
const isSecure = ['https:'].includes(protocol);
2525

26-
if (browser === 'googlechrome') {
26+
if (browser === 'Chrome') {
2727
if (!isSecure) {
2828
schemeUrl = url.replace(protocol, scheme.chrome);
2929
} else {
3030
schemeUrl = url.replace(protocol, scheme.chromeSecure);
3131
}
32-
} else if (browser === 'firefox') {
32+
} else if (browser === 'Firefox') {
3333
schemeUrl = `${scheme.firefox}//open-url?url=${url}`;
34-
} else if (browser === 'brave') {
34+
} else if (browser === 'Brave') {
3535
schemeUrl = `${scheme.brave}//open-url?url=${url}`;
3636
}
3737

@@ -52,7 +52,7 @@ const openLink = async (url: string, theme: TSupportedThemes = 'light'): Promise
5252
url = ensureSecureProtocol(url);
5353
try {
5454
const browser = UserPreferences.getString(DEFAULT_BROWSER_KEY);
55-
if (browser === 'inApp') {
55+
if (browser === 'In_app') {
5656
await WebBrowser.openBrowserAsync(url, {
5757
toolbarColor: themes[theme].surfaceNeutral,
5858
controlsColor: themes[theme].fontSecondaryInfo,

app/views/DefaultBrowserView/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const DefaultBrowserView = () => {
9292
isSelected={(!browser && item.value === 'systemDefault:') || item.title === browser}
9393
title={item.title}
9494
value={item.value}
95-
translateTitle={false}
95+
translateTitle={['In_app', 'System_default'].includes(item.title)}
9696
translateSubtitle={false}
9797
onPress={changeDefaultBrowser}
9898
testID={`default-browser-view-${item.value}`}

0 commit comments

Comments
 (0)