[frontend/components] Reset send button state when opening compose and after successful send

This commit is contained in:
pancakes 2025-02-21 17:51:01 +10:00 committed by Laura Hausmann
parent 5bf14a6a06
commit 22f1d7c8e1
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -272,10 +272,11 @@
private async Task ResetState()
{
var settings = await Settings.GetUserSettingsAsync();
ReplyOrQuote = null;
Attachments = new List<DriveFileResponse>();
NoteDraft = new NoteCreateRequest { Text = "", Visibility = settings.DefaultNoteVisibility, Cw = null };
TextPlaceholder = AvailablePlaceholders["default"];
ReplyOrQuote = null;
Attachments = new List<DriveFileResponse>();
NoteDraft = new NoteCreateRequest { Text = "", Visibility = settings.DefaultNoteVisibility, Cw = null };
TextPlaceholder = AvailablePlaceholders["default"];
SendButton.State = StateButton.StateEnum.Initial;
}
private async Task CloseDialog()
@ -311,7 +312,7 @@
SendButton.State = StateButton.StateEnum.Success;
await CloseDialog();
SendLock = false;
SendButton.State = StateButton.StateEnum.Success;
SendButton.State = StateButton.StateEnum.Initial;
// FIXME: Implement timeline refresh and call it here.
}