private async void OnDelete(object sender, EventArgs e)
        {
            if (Note == null)
            {
                return;
            }

            var result = await NoteStorageService.RemoveNote(Note);

            if (result)
            {
                UserDialogs.Instance.Toast("Note deleted", TimeSpan.FromSeconds(3));
                //notify masterviewcontroller
                OnEntityChanged(Note, NoteOperationType.Delete);

                DismissKeyboard();
            }
            else
            {
                UserDialogs.Instance.Toast($"An error occurred while deleting note: {Note.Title}. Please try again");
            }
        }
Example #2
0
 public async Task <bool> RemoveEntry(NoteEntryModel entry)
 {
     return(await NoteStorageService.RemoveNote(entry));
 }