From 9122434a3649b8f07c06822e48b6f444ceac55e9 Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Sun, 24 Apr 2022 20:14:04 +0300 Subject: [PATCH] frontend: improve channel switch latency by reducing reflows due to scroll-related getters --- .../src/components/pages/main/Message.svelte | 28 +++++++++++++ .../src/components/pages/main/Messages.svelte | 42 +++++-------------- 2 files changed, 39 insertions(+), 31 deletions(-) create mode 100644 frontend/src/components/pages/main/Message.svelte diff --git a/frontend/src/components/pages/main/Message.svelte b/frontend/src/components/pages/main/Message.svelte new file mode 100644 index 0000000..e107504 --- /dev/null +++ b/frontend/src/components/pages/main/Message.svelte @@ -0,0 +1,28 @@ + + + + +
+ { message.author_username } + { message.content } +
diff --git a/frontend/src/components/pages/main/Messages.svelte b/frontend/src/components/pages/main/Messages.svelte index 942a801..fdd2efc 100644 --- a/frontend/src/components/pages/main/Messages.svelte +++ b/frontend/src/components/pages/main/Messages.svelte @@ -1,27 +1,25 @@