Remove redundant linking listeners (#1760)
parent
3e5a64b454
commit
53afafb04f
|
@ -2,7 +2,6 @@ import 'react-native-url-polyfill/auto'
|
||||||
import React, {useState, useEffect} from 'react'
|
import React, {useState, useEffect} from 'react'
|
||||||
import 'lib/sentry' // must be relatively on top
|
import 'lib/sentry' // must be relatively on top
|
||||||
import {withSentry} from 'lib/sentry'
|
import {withSentry} from 'lib/sentry'
|
||||||
import {Linking} from 'react-native'
|
|
||||||
import {RootSiblingParent} from 'react-native-root-siblings'
|
import {RootSiblingParent} from 'react-native-root-siblings'
|
||||||
import * as SplashScreen from 'expo-splash-screen'
|
import * as SplashScreen from 'expo-splash-screen'
|
||||||
import {GestureHandlerRootView} from 'react-native-gesture-handler'
|
import {GestureHandlerRootView} from 'react-native-gesture-handler'
|
||||||
|
@ -15,7 +14,6 @@ import {Shell} from './view/shell'
|
||||||
import * as notifications from 'lib/notifications/notifications'
|
import * as notifications from 'lib/notifications/notifications'
|
||||||
import * as analytics from 'lib/analytics/analytics'
|
import * as analytics from 'lib/analytics/analytics'
|
||||||
import * as Toast from './view/com/util/Toast'
|
import * as Toast from './view/com/util/Toast'
|
||||||
import {handleLink} from './Navigation'
|
|
||||||
import {QueryClientProvider} from '@tanstack/react-query'
|
import {QueryClientProvider} from '@tanstack/react-query'
|
||||||
import {queryClient} from 'lib/react-query'
|
import {queryClient} from 'lib/react-query'
|
||||||
import {TestCtrls} from 'view/com/testing/TestCtrls'
|
import {TestCtrls} from 'view/com/testing/TestCtrls'
|
||||||
|
@ -34,14 +32,6 @@ const App = observer(function AppImpl() {
|
||||||
setRootStore(store)
|
setRootStore(store)
|
||||||
analytics.init(store)
|
analytics.init(store)
|
||||||
notifications.init(store)
|
notifications.init(store)
|
||||||
Linking.getInitialURL().then((url: string | null) => {
|
|
||||||
if (url) {
|
|
||||||
handleLink(url)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
Linking.addEventListener('url', ({url}) => {
|
|
||||||
handleLink(url)
|
|
||||||
})
|
|
||||||
store.onSessionDropped(() => {
|
store.onSessionDropped(() => {
|
||||||
Toast.show('Sorry! Your session expired. Please log in again.')
|
Toast.show('Sorry! Your session expired. Please log in again.')
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue