protected override async Task InitializeData() { if (Id != null) { await ProgressService.RunAsync(async() => { var original = await Api.NoteQuery.Get((Guid)Id); if (original != null) { Original = original; } }); } }
protected override async Task Save() { Original.FolderId = SelectedFolder.Id; Original.Title = Title.TrimNull(); Original.Text = Text.TrimNull(); Original.Reminder = ReminderDate != null ? new ReminderModel { DateTime = (DateTime)ReminderDate?.Date + ReminderTime, } : null; Original.IsFlagged = IsFlagged ?? false; await ProgressService.RunAsync(async() => { await Api.CommandBus.Execute(new SaveNoteCommand(Original)); Messenger.Default.Send(new CloseModalMessage()); }); }