Skip to content

Commit

Permalink
Fix Android in-app browser closing when switching apps (#3546)
Browse files Browse the repository at this point in the history
  • Loading branch information
npmanos authored Apr 14, 2024
1 parent 3b9c5ce commit cb3f246
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/state/preferences/in-app-browser.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react'
import * as persisted from '#/state/persisted'
import {Linking} from 'react-native'
import * as WebBrowser from 'expo-web-browser'

import {isNative} from '#/platform/detection'
import {useModalControls} from '../modals'
import * as persisted from '#/state/persisted'
import {usePalette} from 'lib/hooks/usePalette'
import {
createBskyAppAbsoluteUrl,
isBskyRSSUrl,
isRelativeUrl,
createBskyAppAbsoluteUrl,
} from 'lib/strings/url-helpers'
import {useModalControls} from '../modals'

type StateContext = persisted.Schema['useInAppBrowser']
type SetContext = (v: persisted.Schema['useInAppBrowser']) => void
Expand Down Expand Up @@ -78,6 +79,7 @@ export function useOpenLink() {
presentationStyle:
WebBrowser.WebBrowserPresentationStyle.FULL_SCREEN,
toolbarColor: pal.colors.backgroundLight,
createTask: false,
})
return
}
Expand Down

0 comments on commit cb3f246

Please sign in to comment.