private async void Pin() { App.TelemetryClient.TrackEvent("Pin_EditViewModel"); if (Note.IsEmpty()) { return; } if (IsNewNote) { await AppData.CreateOrUpdateNote(Note); } await NotificationsManager.CreateOrUpdateNoteTile(Note, AppSettings.Instance.TransparentNoteTile); Note.NotifyPropertyChanged("IsPinned"); Note.NotifyPropertyChanged("CanPin"); }
private async void Pin(Note note) { if (note == null || note.IsEmpty()) { return; } App.TelemetryClient.TrackEvent("Pin_NotesControlViewModel"); #if WINDOWS_PHONE_APP //on wp81, the app will suspend after creating the note //on app.xaml.cs the tile will be updated after suspension NoteEditViewModel.CurrentNoteBeingEdited = note; #endif await NotificationsManager.CreateOrUpdateNoteTile(note, AppSettings.Instance.TransparentNoteTile); note.NotifyPropertyChanged("IsPinned"); note.NotifyPropertyChanged("CanPin"); }