Fix chat not scrolling to bottom when messages update.

This commit is contained in:
Paul 2021-08-16 18:59:40 +01:00
parent d13b5e812d
commit 745b03452b
4 changed files with 13 additions and 7 deletions

2
external/lang vendored

@ -1 +1 @@
Subproject commit 18cece0097c05de29c7111fd8d54cd3cdd4ce679 Subproject commit 53bdb2d15516d67a8c989af9bf4d5854b29e6004

View file

@ -116,7 +116,7 @@
"react-virtuoso": "^1.10.4", "react-virtuoso": "^1.10.4",
"redux": "^4.1.0", "redux": "^4.1.0",
"revolt-api": "0.5.2-alpha.1", "revolt-api": "0.5.2-alpha.1",
"revolt.js": "5.0.1-alpha.5", "revolt.js": "5.0.1-alpha.6-patch.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass": "^1.35.1", "sass": "^1.35.1",
"shade-blend-color": "^1.0.0", "shade-blend-color": "^1.0.0",

View file

@ -72,7 +72,13 @@ export const SimpleRenderer: RendererRoutines = {
}); });
}); });
}, },
edit: noopAsync, edit: async (renderer) => {
console.log("EDIT!!");
renderer.emitScroll({
type: "StayAtBottom",
smooth: false,
});
},
delete: async (renderer, id) => { delete: async (renderer, id) => {
const channel = renderer.channel; const channel = renderer.channel;
if (!channel) return; if (!channel) return;

View file

@ -3605,10 +3605,10 @@ revolt-api@0.5.2-alpha.1:
resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.2-alpha.1.tgz#2164d04cd5581267ce59142557666bd386bc85c4" resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.2-alpha.1.tgz#2164d04cd5581267ce59142557666bd386bc85c4"
integrity sha512-3OrjYCDNPkJ+yO9d87NJvuUDAbungEbUfrfHlvFwV8hJze/RMkuYUTFWe1HyBMwBC7F/yWQK+2V7IoifC5STmw== integrity sha512-3OrjYCDNPkJ+yO9d87NJvuUDAbungEbUfrfHlvFwV8hJze/RMkuYUTFWe1HyBMwBC7F/yWQK+2V7IoifC5STmw==
revolt.js@5.0.1-alpha.5: revolt.js@5.0.1-alpha.6-patch.0:
version "5.0.1-alpha.5" version "5.0.1-alpha.6-patch.0"
resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.0.1-alpha.5.tgz#531f456cd80ca786868081825507b868e9eb8e27" resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.0.1-alpha.6-patch.0.tgz#340846faf4b42063d926c9ee2db60a8190f0bc00"
integrity sha512-D17O+MuCSL8KPehu2BoVb17/XgbtwGILMJPvBXyGUvbBuhOzieDAN2gzDCRNP17JvWR9kLkVOzXxWhCaBO36Vw== integrity sha512-vK5qTVoXAl0zLxKsCE7bBdZPjQnJ+qIYEXtWaKg0FVlvODgUq0so1NCQYTiq2MsuVUtSw1y+2Wb4SqnVVNVLZA==
dependencies: dependencies:
axios "^0.19.2" axios "^0.19.2"
eventemitter3 "^4.0.7" eventemitter3 "^4.0.7"