From 745b03452b70e4d916afa72465f0ed975dc9a131 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 16 Aug 2021 18:59:40 +0100 Subject: [PATCH] Fix chat not scrolling to bottom when messages update. --- external/lang | 2 +- package.json | 2 +- src/lib/renderer/simple/SimpleRenderer.ts | 8 +++++++- yarn.lock | 8 ++++---- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/external/lang b/external/lang index 18cece00..53bdb2d1 160000 --- a/external/lang +++ b/external/lang @@ -1 +1 @@ -Subproject commit 18cece0097c05de29c7111fd8d54cd3cdd4ce679 +Subproject commit 53bdb2d15516d67a8c989af9bf4d5854b29e6004 diff --git a/package.json b/package.json index 864e460f..c0ecbb9d 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "react-virtuoso": "^1.10.4", "redux": "^4.1.0", "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", "sass": "^1.35.1", "shade-blend-color": "^1.0.0", diff --git a/src/lib/renderer/simple/SimpleRenderer.ts b/src/lib/renderer/simple/SimpleRenderer.ts index aa7b1af8..02153003 100644 --- a/src/lib/renderer/simple/SimpleRenderer.ts +++ b/src/lib/renderer/simple/SimpleRenderer.ts @@ -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) => { const channel = renderer.channel; if (!channel) return; diff --git a/yarn.lock b/yarn.lock index 4f307aeb..3a1fc8c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" integrity sha512-3OrjYCDNPkJ+yO9d87NJvuUDAbungEbUfrfHlvFwV8hJze/RMkuYUTFWe1HyBMwBC7F/yWQK+2V7IoifC5STmw== -revolt.js@5.0.1-alpha.5: - version "5.0.1-alpha.5" - resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.0.1-alpha.5.tgz#531f456cd80ca786868081825507b868e9eb8e27" - integrity sha512-D17O+MuCSL8KPehu2BoVb17/XgbtwGILMJPvBXyGUvbBuhOzieDAN2gzDCRNP17JvWR9kLkVOzXxWhCaBO36Vw== +revolt.js@5.0.1-alpha.6-patch.0: + version "5.0.1-alpha.6-patch.0" + resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.0.1-alpha.6-patch.0.tgz#340846faf4b42063d926c9ee2db60a8190f0bc00" + integrity sha512-vK5qTVoXAl0zLxKsCE7bBdZPjQnJ+qIYEXtWaKg0FVlvODgUq0so1NCQYTiq2MsuVUtSw1y+2Wb4SqnVVNVLZA== dependencies: axios "^0.19.2" eventemitter3 "^4.0.7"