Skip to content

Commit

Permalink
SCM - fix regression introduced due to moving code (#214638)
Browse files Browse the repository at this point in the history
  • Loading branch information
lszomoru authored Jun 7, 2024
1 parent 52c722c commit b814ff2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vs/workbench/contrib/scm/browser/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class SCMActivityCountBadgeController extends Disposable implements IWork
Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository),
() => this.scmService.repositories);

private readonly _focusedRepository = observableFromEvent(
private readonly _focusedRepository = observableFromEvent<ISCMRepository | undefined>(
this.scmViewService.onDidFocusRepository,
() => this.scmViewService.focusedRepository ? Object.create(this.scmViewService.focusedRepository) : undefined);

Expand All @@ -51,11 +51,12 @@ export class SCMActivityCountBadgeController extends Disposable implements IWork

private readonly _activeRepository = derivedObservableWithCache<ISCMRepository | undefined>(this, (reader, lastValue) => {
const focusedRepository = this._focusedRepository.read(reader);
const activeEditorRepository = this._activeEditorRepository.read(reader);

if (focusedRepository && focusedRepository.id !== lastValue?.id) {
return focusedRepository;
}

const activeEditorRepository = this._activeEditorRepository.read(reader);
if (activeEditorRepository && activeEditorRepository.id !== lastValue?.id) {
return activeEditorRepository;
}
Expand Down

0 comments on commit b814ff2

Please sign in to comment.