parent
ee43de9e5e
commit
c845107a61
|
@ -22,22 +22,17 @@
|
||||||
on:noNeedToScroll="onNoNeedToScroll()"
|
on:noNeedToScroll="onNoNeedToScroll()"
|
||||||
/>
|
/>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#await importPseudoVirtualList}}
|
<!-- if this is a status thread, it's easier to just render the
|
||||||
{{then PseudoVirtualList}}
|
whole thing rather than use a virtual list -->
|
||||||
<!-- if this is a status thread, it's easier to just render the
|
<PseudoVirtualList
|
||||||
whole thing rather than use a virtual list -->
|
component="{{VirtualListComponent}}"
|
||||||
<:Component {PseudoVirtualList}
|
realm="{{$currentInstance + '/' + timeline}}"
|
||||||
component="{{VirtualListComponent}}"
|
containerQuery=".container"
|
||||||
realm="{{$currentInstance + '/' + timeline}}"
|
:makeProps
|
||||||
containerQuery=".container"
|
items="{{$timelineItemIds}}"
|
||||||
:makeProps
|
scrollToItem="{{scrollToItem}}"
|
||||||
items="{{$timelineItemIds}}"
|
on:initialized="initialize()"
|
||||||
scrollToItem="{{scrollToItem}}"
|
/>
|
||||||
on:initialized="initialize()"
|
|
||||||
/>
|
|
||||||
{{catch error}}
|
|
||||||
<div>Component failed to load. Try refreshing! {{error}}</div>
|
|
||||||
{{/await}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
@ -48,6 +43,7 @@
|
||||||
import LoadingFooter from './LoadingFooter.html'
|
import LoadingFooter from './LoadingFooter.html'
|
||||||
import MoreHeaderVirtualWrapper from './MoreHeaderVirtualWrapper.html'
|
import MoreHeaderVirtualWrapper from './MoreHeaderVirtualWrapper.html'
|
||||||
import VirtualList from '../virtualList/VirtualList.html'
|
import VirtualList from '../virtualList/VirtualList.html'
|
||||||
|
import PseudoVirtualList from '../pseudoVirtualList/PseudoVirtualList.html'
|
||||||
import { timelines } from '../../_static/timelines'
|
import { timelines } from '../../_static/timelines'
|
||||||
import { database } from '../../_database/database'
|
import { database } from '../../_database/database'
|
||||||
import {
|
import {
|
||||||
|
@ -60,7 +56,6 @@
|
||||||
import { focusWithCapture, blurWithCapture } from '../../_utils/events'
|
import { focusWithCapture, blurWithCapture } from '../../_utils/events'
|
||||||
import { scheduleIdleTask } from '../../_utils/scheduleIdleTask'
|
import { scheduleIdleTask } from '../../_utils/scheduleIdleTask'
|
||||||
import { mark, stop } from '../../_utils/marks'
|
import { mark, stop } from '../../_utils/marks'
|
||||||
import { importPseudoVirtualList } from '../../_utils/asyncModules'
|
|
||||||
import isEqual from 'lodash-es/isEqual'
|
import isEqual from 'lodash-es/isEqual'
|
||||||
import { doubleRAF } from '../../_utils/doubleRAF'
|
import { doubleRAF } from '../../_utils/doubleRAF'
|
||||||
|
|
||||||
|
@ -83,9 +78,6 @@
|
||||||
scrollTop: 0
|
scrollTop: 0
|
||||||
}),
|
}),
|
||||||
computed: {
|
computed: {
|
||||||
importPseudoVirtualList: (virtual) => {
|
|
||||||
return !virtual && importPseudoVirtualList()
|
|
||||||
},
|
|
||||||
VirtualListComponent: (timelineType) => {
|
VirtualListComponent: (timelineType) => {
|
||||||
return timelineType === 'notifications' ? NotificationVirtualListItem : StatusVirtualListItem
|
return timelineType === 'notifications' ? NotificationVirtualListItem : StatusVirtualListItem
|
||||||
},
|
},
|
||||||
|
@ -146,7 +138,8 @@
|
||||||
},
|
},
|
||||||
store: () => store,
|
store: () => store,
|
||||||
components: {
|
components: {
|
||||||
VirtualList
|
VirtualList,
|
||||||
|
PseudoVirtualList
|
||||||
},
|
},
|
||||||
events: {
|
events: {
|
||||||
focusWithCapture,
|
focusWithCapture,
|
||||||
|
|
|
@ -22,10 +22,6 @@ export const importWebSocketClient = () => import(
|
||||||
/* webpackChunkName: '@gamestdio/websocket' */ '@gamestdio/websocket'
|
/* webpackChunkName: '@gamestdio/websocket' */ '@gamestdio/websocket'
|
||||||
).then(mod => mod.default)
|
).then(mod => mod.default)
|
||||||
|
|
||||||
export const importPseudoVirtualList = () => import(
|
|
||||||
/* webpackChunkName: 'PseudoVirtualList' */ '../_components/pseudoVirtualList/PseudoVirtualList.html'
|
|
||||||
).then(mod => mod.default)
|
|
||||||
|
|
||||||
export const importDialogs = () => import(
|
export const importDialogs = () => import(
|
||||||
/* webpackChunkName: 'dialogs' */ '../_components/dialog/dialogs.js'
|
/* webpackChunkName: 'dialogs' */ '../_components/dialog/dialogs.js'
|
||||||
)
|
)
|
Loading…
Reference in New Issue