Fix broken chats

Co-authored-by: @ltlapy
This commit is contained in:
ThatOneCalculator 2022-07-11 13:45:00 -07:00 committed by Francis Dinh
parent 0e3a9d1e0d
commit 36503f63d8
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE
2 changed files with 18 additions and 15 deletions

View file

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

View file

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