mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 05:35:00 +00:00
fix: ahead/behind indicator of commit in histories view not updated after upstream changed
This commit is contained in:
parent
ce7420354d
commit
c596427380
6 changed files with 99 additions and 29 deletions
|
@ -25,8 +25,6 @@ namespace SourceGit.Models
|
|||
public bool HasDecorators => Decorators.Count > 0;
|
||||
|
||||
public bool IsMerged { get; set; } = false;
|
||||
public bool CanPushToUpstream { get; set; } = false;
|
||||
public bool CanPullFromUpstream { get; set; } = false;
|
||||
public Thickness Margin { get; set; } = new Thickness(0);
|
||||
|
||||
public string AuthorTimeStr => DateTime.UnixEpoch.AddSeconds(AuthorTime).ToLocalTime().ToString("yyyy/MM/dd HH:mm:ss");
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace SourceGit.Models
|
|||
_penCount = colors.Count;
|
||||
}
|
||||
|
||||
public static CommitGraph Parse(List<Commit> commits, HashSet<string> canPushCommits, HashSet<string> canPullCommits)
|
||||
public static CommitGraph Parse(List<Commit> commits)
|
||||
{
|
||||
double UNIT_WIDTH = 12;
|
||||
double HALF_WIDTH = 6;
|
||||
|
@ -148,9 +148,6 @@ namespace SourceGit.Models
|
|||
var isMerged = commit.IsMerged;
|
||||
var oldCount = unsolved.Count;
|
||||
|
||||
commit.CanPushToUpstream = canPushCommits.Remove(commit.SHA);
|
||||
commit.CanPullFromUpstream = canPullCommits.Remove(commit.SHA);
|
||||
|
||||
// Update current y offset
|
||||
offsetY += UNIT_HEIGHT;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue