fix: recalculate toot height after voting on poll (#2198)
This commit is contained in:
parent
ff6e1dc6fc
commit
601c3e40c9
|
@ -34,7 +34,7 @@
|
||||||
<StatusMediaAttachments {...params} on:recalculateHeight />
|
<StatusMediaAttachments {...params} on:recalculateHeight />
|
||||||
{/if}
|
{/if}
|
||||||
{#if showPoll && (showContent || preloadHiddenContent)}
|
{#if showPoll && (showContent || preloadHiddenContent)}
|
||||||
<StatusPoll {...params} shown={showContent} />
|
<StatusPoll {...params} shown={showContent} on:recalculateHeight />
|
||||||
{/if}
|
{/if}
|
||||||
{#if isStatusInOwnThread}
|
{#if isStatusInOwnThread}
|
||||||
<StatusDetails {...params} {...timestampParams} />
|
<StatusDetails {...params} {...timestampParams} />
|
||||||
|
|
|
@ -364,6 +364,8 @@
|
||||||
const { polls } = this.store.get()
|
const { polls } = this.store.get()
|
||||||
polls[pollId] = poll
|
polls[pollId] = poll
|
||||||
this.store.set({ polls })
|
this.store.set({ polls })
|
||||||
|
// the height of the status changes after you vote on the poll
|
||||||
|
requestAnimationFrame(() => this.fire('recalculateHeight'))
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
this.set({ loading: false })
|
this.set({ loading: false })
|
||||||
|
|
Loading…
Reference in a new issue