fix: recalculate toot height after voting on poll

This commit is contained in:
Nolan Lawson 2022-11-17 18:50:26 -08:00
parent ff6e1dc6fc
commit 966d1a776c
2 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,7 @@
<StatusMediaAttachments {...params} on:recalculateHeight />
{/if}
{#if showPoll && (showContent || preloadHiddenContent)}
<StatusPoll {...params} shown={showContent} />
<StatusPoll {...params} shown={showContent} on:recalculateHeight />
{/if}
{#if isStatusInOwnThread}
<StatusDetails {...params} {...timestampParams} />

View File

@ -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 })