fix: recalculate toot height after voting on poll (#2198)

update-emoji-regex
Nolan Lawson 2022-11-17 19:57:26 -08:00 zatwierdzone przez GitHub
rodzic ff6e1dc6fc
commit 601c3e40c9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

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

Wyświetl plik

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