From d0b1fbd7fb538ab71f7b019cdef2ce6aae01a3f5 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 13 May 2021 15:39:22 +0800 Subject: [PATCH] fix: goto repository's tab when it's already opened --- src/Models/Watcher.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Models/Watcher.cs b/src/Models/Watcher.cs index e8d6cfc0..27bb36a3 100644 --- a/src/Models/Watcher.cs +++ b/src/Models/Watcher.cs @@ -44,7 +44,10 @@ namespace SourceGit.Models { /// /// public static void Open(Repository repo) { - if (all.ContainsKey(repo.Path)) return; + if (all.ContainsKey(repo.Path)) { + Opened?.Invoke(repo); + return; + } var watcher = new Watcher(); watcher.Start(repo.Path, repo.GitDir);