-
Notifications
You must be signed in to change notification settings - Fork 4k
Change Fullstory recording start conditions #50516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
33cfb76
4259ad8
63787c4
374d964
fa01ff6
0c4dc63
e8c4fdc
3431717
1175527
741c5c1
9e481eb
084aaac
99f6ecf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ import React, {useCallback, useContext, useEffect, useLayoutEffect, useMemo, use | |
| import type {NativeEventSubscription} from 'react-native'; | ||
| import {AppState, Linking, NativeModules, Platform} from 'react-native'; | ||
| import type {OnyxEntry} from 'react-native-onyx'; | ||
| import Onyx, {useOnyx, withOnyx} from 'react-native-onyx'; | ||
| import Onyx, {useOnyx} from 'react-native-onyx'; | ||
| import ConfirmModal from './components/ConfirmModal'; | ||
| import DeeplinkWrapper from './components/DeeplinkWrapper'; | ||
| import EmojiPicker from './components/EmojiPicker/EmojiPicker'; | ||
|
|
@@ -55,7 +55,7 @@ Onyx.registerLogger(({level, message}) => { | |
| } | ||
| }); | ||
|
|
||
| type ExpensifyOnyxProps = { | ||
| type ExpensifyProps = { | ||
| /** Whether the app is waiting for the server's response to determine if a room is public */ | ||
| isCheckingPublicRoom: OnyxEntry<boolean>; | ||
|
|
||
|
|
@@ -77,18 +77,7 @@ type ExpensifyOnyxProps = { | |
| /** Last visited path in the app */ | ||
| lastVisitedPath: OnyxEntry<string | undefined>; | ||
| }; | ||
|
|
||
| type ExpensifyProps = ExpensifyOnyxProps; | ||
|
|
||
| function Expensify({ | ||
| isCheckingPublicRoom = true, | ||
| updateAvailable, | ||
| isSidebarLoaded = false, | ||
| screenShareRequest, | ||
| updateRequired = false, | ||
| focusModeNotification = false, | ||
| lastVisitedPath, | ||
| }: ExpensifyProps) { | ||
| function Expensify() { | ||
| const appStateChangeListener = useRef<NativeEventSubscription | null>(null); | ||
| const [isNavigationReady, setIsNavigationReady] = useState(false); | ||
| const [isOnyxMigrated, setIsOnyxMigrated] = useState(false); | ||
|
|
@@ -98,7 +87,15 @@ function Expensify({ | |
| const [account] = useOnyx(ONYXKEYS.ACCOUNT); | ||
| const [session] = useOnyx(ONYXKEYS.SESSION); | ||
| const [lastRoute] = useOnyx(ONYXKEYS.LAST_ROUTE); | ||
| const [userMetadata] = useOnyx(ONYXKEYS.USER_METADATA); | ||
| const [shouldShowRequire2FAModal, setShouldShowRequire2FAModal] = useState(false); | ||
| const [isCheckingPublicRoom] = useOnyx(ONYXKEYS.IS_CHECKING_PUBLIC_ROOM); | ||
| const [updateAvailable] = useOnyx(ONYXKEYS.UPDATE_AVAILABLE); | ||
| const [updateRequired] = useOnyx(ONYXKEYS.UPDATE_REQUIRED); | ||
| const [isSidebarLoaded] = useOnyx(ONYXKEYS.IS_SIDEBAR_LOADED); | ||
| const [screenShareRequest] = useOnyx(ONYXKEYS.SCREEN_SHARE_REQUEST); | ||
| const [focusModeNotification] = useOnyx(ONYXKEYS.FOCUS_MODE_NOTIFICATION); | ||
| const [lastVisitedPath] = useOnyx(ONYXKEYS.LAST_VISITED_PATH); | ||
|
|
||
| useEffect(() => { | ||
| if (!account?.needsTwoFactorAuthSetup || account.requiresTwoFactorAuth) { | ||
|
|
@@ -148,15 +145,17 @@ function Expensify({ | |
| // Initialize this client as being an active client | ||
| ActiveClientManager.init(); | ||
|
|
||
| // Initialize Fullstory lib | ||
| FS.init(); | ||
|
|
||
| // Used for the offline indicator appearing when someone is offline | ||
| const unsubscribeNetInfo = NetworkConnection.subscribeToNetInfo(); | ||
|
|
||
| return unsubscribeNetInfo; | ||
| }, []); | ||
|
|
||
| useEffect(() => { | ||
| // Initialize Fullstory lib | ||
| FS.init(userMetadata); | ||
| }, [userMetadata]); | ||
|
|
||
| // Log the platform and config to debug .env issues | ||
| useEffect(() => { | ||
| Log.info('App launched', false, {Platform, CONFIG}); | ||
|
|
@@ -304,30 +303,4 @@ function Expensify({ | |
|
|
||
| Expensify.displayName = 'Expensify'; | ||
|
|
||
| export default withOnyx<ExpensifyProps, ExpensifyOnyxProps>({ | ||
| isCheckingPublicRoom: { | ||
| key: ONYXKEYS.IS_CHECKING_PUBLIC_ROOM, | ||
| initWithStoredValues: false, | ||
| }, | ||
| updateAvailable: { | ||
| key: ONYXKEYS.UPDATE_AVAILABLE, | ||
| initWithStoredValues: false, | ||
| }, | ||
| updateRequired: { | ||
| key: ONYXKEYS.UPDATE_REQUIRED, | ||
| initWithStoredValues: false, | ||
| }, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @danieldoglas I think there's a very likely possibility this change has been leading to issues with the |
||
| isSidebarLoaded: { | ||
| key: ONYXKEYS.IS_SIDEBAR_LOADED, | ||
| }, | ||
| screenShareRequest: { | ||
| key: ONYXKEYS.SCREEN_SHARE_REQUEST, | ||
| }, | ||
| focusModeNotification: { | ||
| key: ONYXKEYS.FOCUS_MODE_NOTIFICATION, | ||
| initWithStoredValues: false, | ||
| }, | ||
| lastVisitedPath: { | ||
| key: ONYXKEYS.LAST_VISITED_PATH, | ||
| }, | ||
| })(Expensify); | ||
| export default Expensify; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep the default value of
isCheckingPublicRoom = trueas previously, there is a hidden bug that cause login page briefly shown when navigate via public room link as anonymous. More details here: #64638 (comment)