feature<Welcome>: supports set bookmark of selected repository from context menu.

This commit is contained in:
leo 2023-08-21 17:38:36 +08:00
parent 7e1b1d7324
commit 5d3088d520
6 changed files with 97 additions and 78 deletions

View file

@ -14,6 +14,11 @@ namespace SourceGit.Models {
/// </summary>
public static event Action<Repository> Opened;
/// <summary>
/// 仓库的书签变化了
/// </summary>
public static event Action<string, int> BookmarkChanged;
/// <summary>
/// 跳转到指定提交的事件
/// </summary>
@ -97,6 +102,15 @@ namespace SourceGit.Models {
}
}
/// <summary>
/// 设置仓库标签变化
/// </summary>
/// <param name="repo"></param>
/// <param name="bookmark"></param>
public static void SetBookmark(string repo, int bookmark) {
BookmarkChanged?.Invoke(repo, bookmark);
}
/// <summary>
/// 跳转到指定的提交
/// </summary>