@@ -32,15 +32,20 @@ public class CommentViewModel : ReactiveObject, ICommentViewModel
3232 /// </summary>
3333 /// <param name="thread">The thread that the comment is a part of.</param>
3434 /// <param name="currentUser">The current user.</param>
35+ /// <param name="pullRequestId">The pull request id of the comment.</param>
3536 /// <param name="commentId">The GraphQL ID of the comment.</param>
37+ /// <param name="databaseId">The database id of the comment.</param>
3638 /// <param name="body">The comment body.</param>
3739 /// <param name="state">The comment edit state.</param>
3840 /// <param name="author">The author of the comment.</param>
3941 /// <param name="updatedAt">The modified date of the comment.</param>
42+ /// <param name="webUrl"></param>
4043 protected CommentViewModel (
4144 ICommentThreadViewModel thread ,
4245 IActorViewModel currentUser ,
46+ int pullRequestId ,
4347 string commentId ,
48+ int databaseId ,
4449 string body ,
4550 CommentEditState state ,
4651 IActorViewModel author ,
@@ -54,6 +59,8 @@ protected CommentViewModel(
5459 Thread = thread ;
5560 CurrentUser = currentUser ;
5661 Id = commentId ;
62+ DatabaseId = databaseId ;
63+ PullRequestId = pullRequestId ;
5764 Body = body ;
5865 EditState = state ;
5966 Author = author ;
@@ -104,8 +111,10 @@ protected CommentViewModel(
104111 CommentModel model )
105112 : this (
106113 thread ,
107- new ActorViewModel ( currentUser ) ,
114+ new ActorViewModel ( currentUser ) ,
115+ model . PullRequestId ,
108116 model . Id ,
117+ model . DatabaseId ,
109118 model . Body ,
110119 CommentEditState . None ,
111120 new ActorViewModel ( model . Author ) ,
@@ -126,7 +135,7 @@ async Task DoDelete(object unused)
126135 ErrorMessage = null ;
127136 IsSubmitting = true ;
128137
129- await Thread . DeleteComment . ExecuteAsyncTask ( Id ) ;
138+ await Thread . DeleteComment . ExecuteAsyncTask ( new Tuple < int , int > ( PullRequestId , DatabaseId ) ) ;
130139 }
131140 catch ( Exception e )
132141 {
@@ -192,6 +201,12 @@ async Task DoCommitEdit(object unused)
192201 /// <inheritdoc/>
193202 public string Id { get ; private set ; }
194203
204+ /// <inheritdoc/>
205+ public int DatabaseId { get ; private set ; }
206+
207+ /// <inheritdoc/>
208+ public int PullRequestId { get ; private set ; }
209+
195210 /// <inheritdoc/>
196211 public string Body
197212 {
0 commit comments