Fix Android in-app browser closing when switching apps (#3546)
parent
3b9c5ceeb3
commit
cb3f246822
|
@ -1,15 +1,16 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import * as persisted from '#/state/persisted'
|
|
||||||
import {Linking} from 'react-native'
|
import {Linking} from 'react-native'
|
||||||
import * as WebBrowser from 'expo-web-browser'
|
import * as WebBrowser from 'expo-web-browser'
|
||||||
|
|
||||||
import {isNative} from '#/platform/detection'
|
import {isNative} from '#/platform/detection'
|
||||||
import {useModalControls} from '../modals'
|
import * as persisted from '#/state/persisted'
|
||||||
import {usePalette} from 'lib/hooks/usePalette'
|
import {usePalette} from 'lib/hooks/usePalette'
|
||||||
import {
|
import {
|
||||||
|
createBskyAppAbsoluteUrl,
|
||||||
isBskyRSSUrl,
|
isBskyRSSUrl,
|
||||||
isRelativeUrl,
|
isRelativeUrl,
|
||||||
createBskyAppAbsoluteUrl,
|
|
||||||
} from 'lib/strings/url-helpers'
|
} from 'lib/strings/url-helpers'
|
||||||
|
import {useModalControls} from '../modals'
|
||||||
|
|
||||||
type StateContext = persisted.Schema['useInAppBrowser']
|
type StateContext = persisted.Schema['useInAppBrowser']
|
||||||
type SetContext = (v: persisted.Schema['useInAppBrowser']) => void
|
type SetContext = (v: persisted.Schema['useInAppBrowser']) => void
|
||||||
|
@ -78,6 +79,7 @@ export function useOpenLink() {
|
||||||
presentationStyle:
|
presentationStyle:
|
||||||
WebBrowser.WebBrowserPresentationStyle.FULL_SCREEN,
|
WebBrowser.WebBrowserPresentationStyle.FULL_SCREEN,
|
||||||
toolbarColor: pal.colors.backgroundLight,
|
toolbarColor: pal.colors.backgroundLight,
|
||||||
|
createTask: false,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue