void ICommentAdded.OnCommentAdded(Message message, Profile profile) { Message.AddComment(message); CommentMessageView childView = new CommentMessageView(message, profile); childView.ICommentAdded = this; slInsertCommentsHere.Children.Add(childView); }
public async void UpdateInfo() { bool hasComments = Message.Commentaries.Count == 0; noCommentsView.IsVisible = hasComments; etCommentContainer.IsVisible = !hasComments; foreach (Message commentMessage in Message.Commentaries) { Profile messageProfile = await App.Data.GetProfileByIdAsync(commentMessage.ProfileId); System.Diagnostics.Debug.WriteLine("comment id = " + commentMessage.Id); CommentMessageView childView = new CommentMessageView(commentMessage, messageProfile); childView.ICommentAdded = this; slInsertCommentsHere.Children.Add(childView); } }