Remove logging of following prefs (#5021)
parent
faf66f3178
commit
9ebc2785e4
|
@ -216,12 +216,6 @@ export type LogEvents = {
|
||||||
|
|
||||||
'profile:header:suggestedFollowsCard:press': {}
|
'profile:header:suggestedFollowsCard:press': {}
|
||||||
|
|
||||||
'debug:followingPrefs': {
|
|
||||||
followingShowRepliesFromPref: 'all' | 'following' | 'off'
|
|
||||||
followingRepliesMinLikePref: number
|
|
||||||
}
|
|
||||||
'debug:followingDisplayed': {}
|
|
||||||
|
|
||||||
'test:all:always': {}
|
'test:all:always': {}
|
||||||
'test:all:sometimes': {}
|
'test:all:sometimes': {}
|
||||||
'test:all:boosted_by_gate1': {reason: 'base' | 'gate1'}
|
'test:all:boosted_by_gate1': {reason: 'base' | 'gate1'}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {logEvent, LogEvents} from '#/lib/statsig/statsig'
|
||||||
import {useGate} from '#/lib/statsig/statsig'
|
import {useGate} from '#/lib/statsig/statsig'
|
||||||
import {emitSoftReset} from '#/state/events'
|
import {emitSoftReset} from '#/state/events'
|
||||||
import {SavedFeedSourceInfo, usePinnedFeedsInfos} from '#/state/queries/feed'
|
import {SavedFeedSourceInfo, usePinnedFeedsInfos} from '#/state/queries/feed'
|
||||||
import {FeedDescriptor, FeedParams} from '#/state/queries/post-feed'
|
import {FeedParams} from '#/state/queries/post-feed'
|
||||||
import {usePreferencesQuery} from '#/state/queries/preferences'
|
import {usePreferencesQuery} from '#/state/queries/preferences'
|
||||||
import {UsePreferencesQueryResponse} from '#/state/queries/preferences/types'
|
import {UsePreferencesQueryResponse} from '#/state/queries/preferences/types'
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
|
@ -108,30 +108,6 @@ function HomeScreenReady({
|
||||||
}
|
}
|
||||||
}, [selectedIndex])
|
}, [selectedIndex])
|
||||||
|
|
||||||
// Temporary, remove when finished debugging
|
|
||||||
const debugHasLoggedFollowingPrefs = React.useRef(false)
|
|
||||||
const debugLogFollowingPrefs = React.useCallback(
|
|
||||||
(feed: FeedDescriptor) => {
|
|
||||||
if (debugHasLoggedFollowingPrefs.current) return
|
|
||||||
if (feed !== 'following') return
|
|
||||||
logEvent('debug:followingPrefs', {
|
|
||||||
followingShowRepliesFromPref: preferences.feedViewPrefs.hideReplies
|
|
||||||
? 'off'
|
|
||||||
: preferences.feedViewPrefs.hideRepliesByUnfollowed
|
|
||||||
? 'following'
|
|
||||||
: 'all',
|
|
||||||
followingRepliesMinLikePref:
|
|
||||||
preferences.feedViewPrefs.hideRepliesByLikeCount,
|
|
||||||
})
|
|
||||||
debugHasLoggedFollowingPrefs.current = true
|
|
||||||
},
|
|
||||||
[
|
|
||||||
preferences.feedViewPrefs.hideReplies,
|
|
||||||
preferences.feedViewPrefs.hideRepliesByLikeCount,
|
|
||||||
preferences.feedViewPrefs.hideRepliesByUnfollowed,
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
const {hasSession} = useSession()
|
const {hasSession} = useSession()
|
||||||
const setMinimalShellMode = useSetMinimalShellMode()
|
const setMinimalShellMode = useSetMinimalShellMode()
|
||||||
const setDrawerSwipeDisabled = useSetDrawerSwipeDisabled()
|
const setDrawerSwipeDisabled = useSetDrawerSwipeDisabled()
|
||||||
|
@ -154,7 +130,6 @@ function HomeScreenReady({
|
||||||
feedUrl: selectedFeed,
|
feedUrl: selectedFeed,
|
||||||
reason: 'focus',
|
reason: 'focus',
|
||||||
})
|
})
|
||||||
debugLogFollowingPrefs(selectedFeed)
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
@ -205,9 +180,8 @@ function HomeScreenReady({
|
||||||
feedUrl: feed,
|
feedUrl: feed,
|
||||||
reason,
|
reason,
|
||||||
})
|
})
|
||||||
debugLogFollowingPrefs(feed)
|
|
||||||
},
|
},
|
||||||
[allFeeds, debugLogFollowingPrefs],
|
[allFeeds],
|
||||||
)
|
)
|
||||||
|
|
||||||
const onPressSelected = React.useCallback(() => {
|
const onPressSelected = React.useCallback(() => {
|
||||||
|
|
Loading…
Reference in New Issue