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