diff --git a/packages/tauri/src/virtual_branches/virtual.rs b/packages/tauri/src/virtual_branches/virtual.rs index 79a096d36..85d70677a 100644 --- a/packages/tauri/src/virtual_branches/virtual.rs +++ b/packages/tauri/src/virtual_branches/virtual.rs @@ -49,7 +49,7 @@ pub struct VirtualBranch { pub upstream: Option, // the upstream branch where this branch pushes to, if any pub base_current: bool, // is this vbranch based on the current base branch? if false, this needs to be manually merged with conflicts pub ownership: Ownership, - pub updated_timestamp_ms: u128, + pub updated_at: u128, } // this is the struct that maps to the view `Commit` type in Typescript @@ -830,7 +830,7 @@ pub fn list_virtual_branches( conflicted: conflicts::is_resolving(project_repository), base_current, ownership: branch.ownership.clone(), - updated_timestamp_ms: branch.updated_timestamp_ms, + updated_at: branch.updated_timestamp_ms, }; branches.push(branch); } diff --git a/packages/ui/src/lib/branches/types.ts b/packages/ui/src/lib/branches/types.ts index 4c9203349..5a500546c 100644 --- a/packages/ui/src/lib/branches/types.ts +++ b/packages/ui/src/lib/branches/types.ts @@ -69,6 +69,6 @@ export class CombinedBranch { get modifiedAt(): Date | undefined { if (this.pr) return this.pr.modifiedAt || this.pr.createdAt; if (this.remoteBranch) return this.remoteBranch.lastCommitTs; - return this.vbranch?.updatedTimestamp; + return this.vbranch?.updatedAt; } } diff --git a/packages/ui/src/lib/vbranches/types.ts b/packages/ui/src/lib/vbranches/types.ts index 51a2d3dea..aa0b668e6 100644 --- a/packages/ui/src/lib/vbranches/types.ts +++ b/packages/ui/src/lib/vbranches/types.ts @@ -61,11 +61,8 @@ export class Branch { // If the branch has been already applied, then it was either performed cleanly or we generated conflict markers in the diffs. // (therefore this field is applicable for stashed/unapplied or remote branches, i.e. active == false) isMergeable!: Promise; - updatedTimestampMs!: number; - - get updatedTimestamp(): Date { - return new Date(this.updatedTimestampMs); - } + @Transform((obj) => new Date(obj.value)) + updatedAt!: Date; get upstreamName() { return this.upstream?.name.split('/').slice(-1)[0];