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

Commit faa44d9

Browse files
committed
We don't need this here, it's on StartPageCloneViewModel
1 parent 4973964 commit faa44d9

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -54,44 +54,6 @@ public class RepositoryCloneViewModel : BaseViewModel, IRepositoryCloneViewModel
5454
: this(connectionRepositoryHostMap.CurrentRepositoryHost, repositoryCloneService, operatingSystem, notificationService, usageTracker)
5555
{ }
5656

57-
public RepositoryCloneViewModel(
58-
IRepositoryHost repositoryHost,
59-
IRepositoryModel repositoryToClone,
60-
IRepositoryCloneService cloneService,
61-
IOperatingSystem operatingSystem,
62-
INotificationService notificationService,
63-
IUsageTracker usageTracker)
64-
{
65-
this.repositoryHost = repositoryHost;
66-
this.cloneService = cloneService;
67-
this.operatingSystem = operatingSystem;
68-
this.notificationService = notificationService;
69-
this.usageTracker = usageTracker;
70-
this.SelectedRepository = repositoryToClone;
71-
72-
Title = string.Format(CultureInfo.CurrentCulture, Resources.CloneTitle, repositoryHost.Title);
73-
74-
var baseRepositoryPath = this.WhenAnyValue(x => x.BaseRepositoryPath);
75-
76-
BaseRepositoryPathValidator = ReactivePropertyValidator.ForObservable(baseRepositoryPath)
77-
.IfNullOrEmpty(Resources.RepositoryCreationClonePathEmpty)
78-
.IfTrue(x => x.Length > 200, Resources.RepositoryCreationClonePathTooLong)
79-
.IfContainsInvalidPathChars(Resources.RepositoryCreationClonePathInvalidCharacters)
80-
.IfPathNotRooted(Resources.RepositoryCreationClonePathInvalid)
81-
.IfTrue(IsAlreadyRepoAtPath, Resources.RepositoryNameValidatorAlreadyExists);
82-
83-
var canCloneObservable = this.WhenAny(
84-
x => x.SelectedRepository,
85-
x => x.BaseRepositoryPathValidator.ValidationResult.IsValid,
86-
(x, y) => x.Value != null && y.Value);
87-
canClone = canCloneObservable.ToProperty(this, x => x.CanClone);
88-
CloneCommand = ReactiveCommand.CreateAsyncObservable(canCloneObservable, OnCloneRepository);
89-
90-
browseForDirectoryCommand.Subscribe(_ => ShowBrowseForDirectoryDialog());
91-
this.WhenAny(x => x.BaseRepositoryPathValidator.ValidationResult, x => x.Value)
92-
.Subscribe();
93-
BaseRepositoryPath = cloneService.DefaultClonePath;
94-
}
9557

9658
public RepositoryCloneViewModel(
9759
IRepositoryHost repositoryHost,

0 commit comments

Comments
 (0)