From 966d1a776cee837e7e10f1bd69755f9fb912ddd6 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Thu, 17 Nov 2022 18:50:26 -0800 Subject: [PATCH] fix: recalculate toot height after voting on poll --- 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 })