Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
forgot about edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Bloctans authored and showierdata9978 committed Feb 16, 2024
1 parent 76b5ca3 commit 427dc7b
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions src/lib/Post.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -320,18 +320,26 @@
{/if}
{#if input && !input.disabled && !noPFP && !editing}
{#if post.user === $user.name}
<button
class="circle pen"
on:click={async () => {
editError = "";
editing = true;
await tick();
editContentInput.value =
post.unfiltered_content || post.content;
editContentInput.focus();
autoresize(editContentInput);
}}
/>
{#if !bridged}
<button
class="circle pen"
on:click={async () => {
editError = "";
editing = true;
await tick();
editContentInput.value =
post.unfiltered_content || post.content;
editContentInput.focus();
autoresize(editContentInput);
}}
/>
{:else}
<button
class="circle pen"
disabled
title="You cannot edit bridged messages."
/>
{/if}
{/if}
<button
class="circle reply"
Expand Down

0 comments on commit 427dc7b

Please sign in to comment.