feature<Repository>: supports modify display name of repository

This commit is contained in:
leo 2024-01-17 11:02:08 +08:00
parent 22416812a0
commit 4e40018a78
8 changed files with 160 additions and 1 deletions

View file

@ -14,6 +14,11 @@ namespace SourceGit.Models {
/// </summary>
public static event Action<Repository> Opened;
/// <summary>
/// 仓库的显示名变化了
/// </summary>
public static event Action<string, string> DisplayNameChanged;
/// <summary>
/// 仓库的书签变化了
/// </summary>
@ -102,6 +107,14 @@ namespace SourceGit.Models {
}
}
/// <summary>
/// 通知仓库显示名变化
/// </summary>
/// <param name="repo"></param>
public static void NotifyDisplayNameChanged(Repository repo) {
DisplayNameChanged?.Invoke(repo.Path, repo.Name);
}
/// <summary>
/// 通知仓库标签变化
/// </summary>