change(ui): cleanup
This commit is contained in:
parent
6b2f66f8d6
commit
ed5a8fbd69
3 changed files with 6 additions and 11 deletions
|
|
@ -119,8 +119,7 @@ export default class MessageManager {
|
|||
private readonly session: any /*Session*/,
|
||||
private readonly state: Store<State>,
|
||||
private readonly screen: Screen,
|
||||
initialLists?: Partial<InitialLists>,
|
||||
coldStart?: boolean
|
||||
initialLists?: Partial<InitialLists>
|
||||
) {
|
||||
this.pagesManager = new PagesManager(screen, this.session.isMobile, cssLoading => {
|
||||
screen.displayFrame(!cssLoading)
|
||||
|
|
@ -139,9 +138,7 @@ export default class MessageManager {
|
|||
|
||||
this.activityManager = new ActivityManager(this.session.duration.milliseconds) // only if not-live
|
||||
|
||||
if (!coldStart) {
|
||||
this.loadMessages()
|
||||
}
|
||||
void this.loadMessages()
|
||||
}
|
||||
|
||||
private _sortMessagesHack(msgs: Message[]) {
|
||||
|
|
|
|||
|
|
@ -57,9 +57,7 @@ export default class Screen {
|
|||
private readonly screen: HTMLDivElement;
|
||||
private parentElement: HTMLElement | null = null;
|
||||
|
||||
constructor(isMobile: boolean, coldStart?: boolean) {
|
||||
if (coldStart) return;
|
||||
|
||||
constructor(isMobile: boolean) {
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.className = styles.iframe;
|
||||
this.iframe = iframe;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default class WebPlayer extends Player {
|
|||
|
||||
private targetMarker: TargetMarker
|
||||
|
||||
constructor(protected wpState: Store<typeof WebPlayer.INITIAL_STATE>, session: any, live: boolean, coldStart?: boolean) {
|
||||
constructor(protected wpState: Store<typeof WebPlayer.INITIAL_STATE>, session: any, live: boolean) {
|
||||
let initialLists = live ? {} : {
|
||||
event: session.events || [],
|
||||
stack: session.stackEvents || [],
|
||||
|
|
@ -40,8 +40,8 @@ export default class WebPlayer extends Player {
|
|||
) || [],
|
||||
}
|
||||
|
||||
const screen = new Screen(session.isMobile, coldStart)
|
||||
const messageManager = new MessageManager(session, wpState, screen, initialLists, coldStart)
|
||||
const screen = new Screen(session.isMobile)
|
||||
const messageManager = new MessageManager(session, wpState, screen, initialLists)
|
||||
super(wpState, messageManager)
|
||||
this.screen = screen
|
||||
this.messageManager = messageManager
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue