Example #1
0
 public async Task<Comment> AddComment(string comment, long? parentId = null)
 {
     var response = await XamarinImgur.APIWrappers.Comments.CreateComment(comment, Id, parentId);
     if (!response.IsError)
     {
         var c = new Comment { Id = response.Content.Value, ImageId = Id, CommentText = comment, Author = await SecretsHelper.GetUserName(), Children = new List<Comment>() };
         return c;
     }
     return null;
 }
Example #2
0
 public CommentViewModel(Comment comment)
 {
     this.comment = comment;
     SetPoints();
     SetVote();
 }