fix appending to pagination component

FoundKeyGang/FoundKey#16
This commit is contained in:
Johann150 2022-07-19 09:20:07 +02:00
commit e5f41ece7e
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 18 additions and 18 deletions

View file

@ -180,8 +180,9 @@ const prepend = (item: Item): void => {
if (props.pagination.reversed) {
if (rootEl.value) {
const container = getScrollContainer(rootEl.value);
if (container == null) return; // TODO?
if (container == null) {
// TODO?
} else {
const pos = getScrollPosition(rootEl.value);
const viewHeight = container.clientHeight;
const height = container.scrollHeight;
@ -198,6 +199,7 @@ const prepend = (item: Item): void => {
}
}
}
}
items.value.push(item);
// TODO
} else {

View file

@ -292,6 +292,7 @@ definePageMetadata(computed(() => !fetching ? user ? {
<style lang="scss" scoped>
.mk-messaging-room {
position: relative;
overflow: auto;
> .body {
.more {
@ -335,10 +336,7 @@ definePageMetadata(computed(() => !fetching ? user ? {
z-index: 2;
bottom: 0;
padding-top: 8px;
@media (max-width: 500px) {
bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
}
bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
> .new-message {
width: 100%;