track when discover feeds screen is opened
This commit is contained in:
@@ -134,4 +134,5 @@ interface ScreenPropertiesMap {
|
|||||||
BlockedAccounts: {}
|
BlockedAccounts: {}
|
||||||
MutedAccounts: {}
|
MutedAccounts: {}
|
||||||
SavedFeeds: {}
|
SavedFeeds: {}
|
||||||
|
DiscoverFeeds: {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ export const MultiFeed = observer(function Feed({
|
|||||||
|
|
||||||
// rendering
|
// rendering
|
||||||
// =
|
// =
|
||||||
|
|
||||||
const renderItem = React.useCallback(
|
const renderItem = React.useCallback(
|
||||||
({item}: {item: MultiFeedItem}) => {
|
({item}: {item: MultiFeedItem}) => {
|
||||||
if (item.type === 'header') {
|
if (item.type === 'header') {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {isDesktopWeb} from 'platform/detection'
|
|||||||
import {usePalette} from 'lib/hooks/usePalette'
|
import {usePalette} from 'lib/hooks/usePalette'
|
||||||
import {s} from 'lib/styles'
|
import {s} from 'lib/styles'
|
||||||
import {CustomFeedModel} from 'state/models/feeds/custom-feed'
|
import {CustomFeedModel} from 'state/models/feeds/custom-feed'
|
||||||
|
import {useAnalytics} from 'lib/analytics/analytics'
|
||||||
|
|
||||||
type Props = NativeStackScreenProps<CommonNavigatorParams, 'DiscoverFeeds'>
|
type Props = NativeStackScreenProps<CommonNavigatorParams, 'DiscoverFeeds'>
|
||||||
export const DiscoverFeedsScreen = withAuthRequired(
|
export const DiscoverFeedsScreen = withAuthRequired(
|
||||||
@@ -21,12 +22,14 @@ export const DiscoverFeedsScreen = withAuthRequired(
|
|||||||
const store = useStores()
|
const store = useStores()
|
||||||
const pal = usePalette('default')
|
const pal = usePalette('default')
|
||||||
const feeds = React.useMemo(() => new FeedsDiscoveryModel(store), [store])
|
const feeds = React.useMemo(() => new FeedsDiscoveryModel(store), [store])
|
||||||
|
const {screen} = useAnalytics()
|
||||||
|
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
React.useCallback(() => {
|
React.useCallback(() => {
|
||||||
store.shell.setMinimalShellMode(false)
|
store.shell.setMinimalShellMode(false)
|
||||||
feeds.refresh()
|
feeds.refresh()
|
||||||
}, [store, feeds]),
|
screen('DiscoverFeeds')
|
||||||
|
}, [store, feeds, screen]),
|
||||||
)
|
)
|
||||||
|
|
||||||
const onRefresh = React.useCallback(() => {
|
const onRefresh = React.useCallback(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user