diff --git a/src/lib/components/lemmy/post/PostForm.svelte b/src/lib/components/lemmy/post/PostForm.svelte index 5c8dd03e..712464d2 100644 --- a/src/lib/components/lemmy/post/PostForm.svelte +++ b/src/lib/components/lemmy/post/PostForm.svelte @@ -321,6 +321,7 @@ }} size="square-lg" disabled={!getSessionStorage('postDraft')} + title="Restore From Draft" > diff --git a/src/lib/components/lemmy/post/PostVote.svelte b/src/lib/components/lemmy/post/PostVote.svelte index 99a2612e..19167377 100644 --- a/src/lib/components/lemmy/post/PostVote.svelte +++ b/src/lib/components/lemmy/post/PostVote.svelte @@ -35,6 +35,8 @@ export let upvotes: number = 0 export let downvotes: number = 0 + let loading = false + let oldScore = score const castVote = async (newVote: number) => { @@ -42,17 +44,20 @@ toast({ content: 'You must be logged in to vote.', type: 'warning' }) return } + loading = true oldScore = score vote = newVote const res = await voteItem(post, newVote, $profile.jwt) ;({ upvotes, downvotes, score } = res) + loading = false } castVote(vote == 1 ? 0 : 1)}