Skip to content

Commit 8769d7c

Browse files
committed
fix: check stackingFeature to determine which alg to use for assigning 'localAndRemote' commit status
1 parent 9e27fea commit 8769d7c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

apps/desktop/src/lib/vbranches/types.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import 'reflect-metadata';
2+
import { stackingFeature } from '$lib/config/uiFeatureFlags';
23
import { emptyConflictEntryPresence, type ConflictEntryPresence } from '$lib/conflictEntryPresence';
34
import { splitMessage } from '$lib/utils/commitMessage';
45
import { hashCode } from '$lib/utils/string';
56
import { isDefined, notNull } from '@gitbutler/ui/utils/typeguards';
67
import { Type, Transform } from 'class-transformer';
8+
import { get } from 'svelte/store';
79
import type { PullRequest } from '$lib/gitHost/interface/types';
810

911
export type ChangeType =
@@ -242,7 +244,12 @@ export class DetailedCommit {
242244

243245
get status(): CommitStatus {
244246
if (this.isIntegrated) return 'integrated';
245-
if (this.remoteCommitId) return 'localAndRemote';
247+
if (get(stackingFeature)) {
248+
if (this.remoteCommitId) return 'localAndRemote';
249+
} else {
250+
if (this.isRemote && (!this.relatedTo || this.id === this.relatedTo.id))
251+
return 'localAndRemote';
252+
}
246253
return 'local';
247254
}
248255

0 commit comments

Comments
 (0)