Notification and pagination bugfixes
This commit is contained in:
parent
014b394f66
commit
8618b2084d
|
@ -49,6 +49,7 @@
|
|||
</template>
|
||||
<XNotificationGroup
|
||||
v-else-if="notificationGroup.type === 'group'"
|
||||
:key="'group' + notificationGroup.id"
|
||||
:notificationGroup="notificationGroup"
|
||||
:with-time="true"
|
||||
:full="true"
|
||||
|
|
|
@ -297,11 +297,12 @@ const prepend = (item: PageItem): void => {
|
|||
} else {
|
||||
if (!queue.value.length) {
|
||||
onScrollTop(rootEl.value, () => {
|
||||
items.value = [
|
||||
...queue.value.reverse(),
|
||||
...items.value,
|
||||
].slice(0, props.displayLimit);
|
||||
const queueRemoved = [...queue.value].reverse();
|
||||
queue.value = [];
|
||||
items.value = [...queueRemoved, ...items.value].slice(
|
||||
0,
|
||||
props.displayLimit
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -300,13 +300,19 @@ const prepend = (item: Item): void => {
|
|||
// Prepend the item
|
||||
items.value = [item, ...items.value].slice(0, props.displayLimit);
|
||||
} else {
|
||||
if (!queue.value.length && rootEl.value) {
|
||||
if (!rootEl.value) {
|
||||
items.value.unshift(item);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!queue.value.length) {
|
||||
onScrollTop(rootEl.value, () => {
|
||||
items.value = [
|
||||
...queue.value.reverse(),
|
||||
...items.value,
|
||||
].slice(0, props.displayLimit);
|
||||
const queueRemoved = [...queue.value].reverse();
|
||||
queue.value = [];
|
||||
items.value = [...queueRemoved, ...items.value].slice(
|
||||
0,
|
||||
props.displayLimit
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue