[frontend] Clear replyTo when composing new note
This commit is contained in:
parent
39a9cd0f6e
commit
36d5fc32c7
1 changed files with 11 additions and 5 deletions
|
@ -11,8 +11,7 @@
|
||||||
<button @onclick="CloseDialog">
|
<button @onclick="CloseDialog">
|
||||||
<Icon Name="Icons.X"/>
|
<Icon Name="Icons.X"/>
|
||||||
</button>
|
</button>
|
||||||
<Dropdown TBind="NoteVisibility" Elements="@DropDownCreate()" @bind-Value="NoteDraft.Visibility">
|
<Dropdown TBind="NoteVisibility" Elements="@DropDownCreate()" @bind-Value="NoteDraft.Visibility" />
|
||||||
</Dropdown>
|
|
||||||
<button @onclick="SendNote" class="post-btn">Post<Icon Name="Icons.PaperPlaneRight"/></button>
|
<button @onclick="SendNote" class="post-btn">Post<Icon Name="Icons.PaperPlaneRight"/></button>
|
||||||
</div>
|
</div>
|
||||||
@if (ReplyTo != null)
|
@if (ReplyTo != null)
|
||||||
|
@ -50,7 +49,7 @@
|
||||||
private NoteCreateRequest NoteDraft { get; set; } = new NoteCreateRequest
|
private NoteCreateRequest NoteDraft { get; set; } = new NoteCreateRequest
|
||||||
{
|
{
|
||||||
Text = "",
|
Text = "",
|
||||||
Visibility = NoteVisibility.Public, // FIXME: Default to visibilty in settings
|
Visibility = NoteVisibility.Followers, // FIXME: Default to visibilty in settings
|
||||||
Cw = null
|
Cw = null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -99,6 +98,13 @@
|
||||||
{
|
{
|
||||||
ReplyTo = replyTo;
|
ReplyTo = replyTo;
|
||||||
NoteDraft.ReplyId = replyTo.Id;
|
NoteDraft.ReplyId = replyTo.Id;
|
||||||
|
NoteDraft.Visibility = replyTo.Visibility;
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ReplyTo = null;
|
||||||
|
NoteDraft.ReplyId = null;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue