private async void Note_LostFocus(object sender, RoutedEventArgs e)
 {
     var userid = DisplayedMember.User.Id;
     var note   = Note.Text;
     await Task.Run(async() =>
     {
         await RESTCalls.AddNote(userid, note);
     });
 }
Ejemplo n.º 2
0
        private async void NoteBox_LostFocus(object sender, RoutedEventArgs e)
        {
            var userid = profile.user.Id;
            var note   = NoteBox.Text.Trim();

            if (LocalState.Notes.ContainsKey(userid) && note == LocalState.Notes[userid].Trim())
            {
                return;
            }
            if (!LocalState.Notes.ContainsKey(userid) && string.IsNullOrEmpty(note))
            {
                return;
            }
            await RESTCalls.AddNote(profile.user.Id, NoteBox.Text);
        }