From 601c3e40c932c425d58d138a9518e2870501698f Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Thu, 17 Nov 2022 19:57:26 -0800 Subject: [PATCH] fix: recalculate toot height after voting on poll (#2198) --- src/routes/_components/status/Status.html | 2 +- src/routes/_components/status/StatusPoll.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/_components/status/Status.html b/src/routes/_components/status/Status.html index e4732469..e00a5a01 100644 --- a/src/routes/_components/status/Status.html +++ b/src/routes/_components/status/Status.html @@ -34,7 +34,7 @@ {/if} {#if showPoll && (showContent || preloadHiddenContent)} - + {/if} {#if isStatusInOwnThread} diff --git a/src/routes/_components/status/StatusPoll.html b/src/routes/_components/status/StatusPoll.html index 839e944b..4ab90bb8 100644 --- a/src/routes/_components/status/StatusPoll.html +++ b/src/routes/_components/status/StatusPoll.html @@ -364,6 +364,8 @@ const { polls } = this.store.get() polls[pollId] = poll this.store.set({ polls }) + // the height of the status changes after you vote on the poll + requestAnimationFrame(() => this.fire('recalculateHeight')) } } finally { this.set({ loading: false })