mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 12:21:02 +01:00
fix: Recording event loading (#12297)
Co-authored-by: Alex Kim <alexgkim205@gmail.com>
This commit is contained in:
parent
7aaa6ef710
commit
9f0602a6d4
@ -74,7 +74,7 @@ export function PlayerList<T extends Record<string, any>>({
|
||||
|
||||
return (
|
||||
<div className="PlayerList">
|
||||
{sessionEventsDataLoading || sessionPlayerMetaDataLoading ? (
|
||||
{!data.length && (sessionEventsDataLoading || sessionPlayerMetaDataLoading) ? (
|
||||
<SpinnerOverlay />
|
||||
) : (
|
||||
<>
|
||||
|
@ -46,7 +46,7 @@ export const eventsListLogic = kea<eventsListLogicType>([
|
||||
logic: [eventUsageLogic],
|
||||
actions: [
|
||||
sessionRecordingDataLogic({ sessionRecordingId }),
|
||||
['setFilters', 'loadEventsSuccess'],
|
||||
['setFilters'],
|
||||
sessionRecordingPlayerLogic({ sessionRecordingId, playerKey }),
|
||||
['seek'],
|
||||
],
|
||||
|
@ -172,14 +172,6 @@ export const sessionRecordingDataLogic = kea<sessionRecordingDataLogicType>([
|
||||
loadRecordingSnapshotsSuccess: (state) => state + 1,
|
||||
},
|
||||
],
|
||||
sessionEventsDataLoading: [
|
||||
false,
|
||||
{
|
||||
loadEventsSuccess: (_, { sessionEventsData }) => {
|
||||
return !!sessionEventsData?.next
|
||||
},
|
||||
},
|
||||
],
|
||||
loadMetaTimeMs: [
|
||||
null as number | null,
|
||||
{
|
||||
@ -236,14 +228,14 @@ export const sessionRecordingDataLogic = kea<sessionRecordingDataLogicType>([
|
||||
else {
|
||||
eventUsageLogic.actions.reportRecording(
|
||||
values.sessionPlayerData,
|
||||
performance.now() - cache.startTime,
|
||||
performance.now() - cache.loadStartTime,
|
||||
SessionRecordingUsageType.LOADED,
|
||||
0
|
||||
)
|
||||
}
|
||||
// Not always accurate that recording is playable after first chunk is loaded, but good guesstimate for now
|
||||
if (values.chunkPaginationIndex === 1) {
|
||||
actions.reportUsage(values.sessionPlayerData, performance.now() - cache.startTime)
|
||||
actions.reportUsage(values.sessionPlayerData, performance.now() - cache.loadStartTime)
|
||||
}
|
||||
},
|
||||
loadEventsSuccess: () => {
|
||||
|
Loading…
Reference in New Issue
Block a user