Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 552693e

Browse files
authored
Merge pull request #1313 from github/fixes/remove-unused-code
Remove unused code.
2 parents 9b0e2d5 + 39ba15c commit 552693e

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

src/GitHub.InlineReviews/ViewModels/CommentThreadViewModel.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ namespace GitHub.InlineReviews.ViewModels
99
/// <summary>
1010
/// Base view model for a thread of comments.
1111
/// </summary>
12-
public abstract class CommentThreadViewModel : ReactiveObject, ICommentThreadViewModel, IDisposable
12+
public abstract class CommentThreadViewModel : ReactiveObject, ICommentThreadViewModel
1313
{
1414
ReactiveCommand<ICommentModel> postComment;
15-
IDisposable placeholderSubscription;
1615

1716
/// <summary>
1817
/// Intializes a new instance of the <see cref="CommentThreadViewModel"/> class.
@@ -48,21 +47,7 @@ public ReactiveCommand<ICommentModel> PostComment
4847
/// <inheritdoc/>
4948
public IAccount CurrentUser { get; }
5049

51-
public void Dispose()
52-
{
53-
Dispose(true);
54-
GC.SuppressFinalize(this);
55-
}
56-
5750
/// <inheritdoc/>
5851
public abstract Uri GetCommentUrl(int id);
59-
60-
protected virtual void Dispose(bool disposing)
61-
{
62-
if (disposing)
63-
{
64-
placeholderSubscription?.Dispose();
65-
}
66-
}
6752
}
6853
}

src/GitHub.InlineReviews/ViewModels/NewInlineCommentThreadViewModel.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
using System;
22
using System.Linq;
3-
using System.Reactive;
43
using System.Reactive.Linq;
5-
using System.Reactive.Subjects;
64
using System.Threading.Tasks;
7-
using GitHub.Api;
85
using GitHub.Extensions;
96
using GitHub.Models;
107
using GitHub.Services;
@@ -17,7 +14,6 @@ namespace GitHub.InlineReviews.ViewModels
1714
/// </summary>
1815
public class NewInlineCommentThreadViewModel : CommentThreadViewModel
1916
{
20-
readonly Subject<Unit> finished = new Subject<Unit>();
2117
bool needsPush;
2218

2319
/// <summary>
@@ -116,7 +112,6 @@ async Task<ICommentModel> DoPostComment(object parameter)
116112
File.RelativePath.Replace("\\", "/"),
117113
diffPosition.DiffLineNumber);
118114

119-
finished.OnNext(Unit.Default);
120115
return model;
121116
}
122117
}

0 commit comments

Comments
 (0)