fix(player): correct PagesManager re-initialisation
This commit is contained in:
parent
132c8a9720
commit
98ce685787
1 changed files with 7 additions and 5 deletions
|
|
@ -122,10 +122,7 @@ export default class MessageManager {
|
|||
private readonly screen: Screen,
|
||||
initialLists?: Partial<InitialLists>
|
||||
) {
|
||||
this.pagesManager = new PagesManager(screen, this.session.isMobile, cssLoading => {
|
||||
screen.displayFrame(!cssLoading)
|
||||
state.update({ cssLoading, ready: !state.get().messagesLoading && !cssLoading })
|
||||
})
|
||||
this.pagesManager = new PagesManager(screen, this.session.isMobile, this.setCSSLoading)
|
||||
this.mouseMoveManager = new MouseMoveManager(screen)
|
||||
|
||||
this.sessionStart = this.session.startedAt
|
||||
|
|
@ -142,6 +139,11 @@ export default class MessageManager {
|
|||
void this.loadMessages()
|
||||
}
|
||||
|
||||
private setCSSLoading = (cssLoading: boolean) => {
|
||||
this.screen.displayFrame(!cssLoading)
|
||||
this.state.update({ cssLoading, ready: !this.state.get().messagesLoading && !cssLoading })
|
||||
}
|
||||
|
||||
private _sortMessagesHack(msgs: Message[]) {
|
||||
// @ts-ignore Hack for upet (TODO: fix ordering in one mutation in tracker(removes first))
|
||||
const headChildrenIds = msgs.filter(m => m.parentID === 1).map(m => m.id);
|
||||
|
|
@ -261,7 +263,7 @@ export default class MessageManager {
|
|||
|
||||
this.performanceTrackManager = new PerformanceTrackManager()
|
||||
this.windowNodeCounter = new WindowNodeCounter();
|
||||
this.pagesManager = new PagesManager(this.screen, this.session.isMobile, this)
|
||||
this.pagesManager = new PagesManager(this.screen, this.session.isMobile, this.setCSSLoading)
|
||||
this.mouseMoveManager = new MouseMoveManager(this.screen);
|
||||
this.activityManager = new ActivityManager(this.session.duration.milliseconds);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue