mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-25 20:24:04 +00:00
Fixes #94163
This commit is contained in:
@@ -227,6 +227,6 @@ export class GitTimelineProvider implements TimelineProvider {
|
||||
|
||||
@debounce(500)
|
||||
private fireChanged() {
|
||||
this._onDidChange.fire({ reset: true });
|
||||
this._onDidChange.fire(undefined);
|
||||
}
|
||||
}
|
||||
|
||||
5
src/vs/vscode.proposed.d.ts
vendored
5
src/vs/vscode.proposed.d.ts
vendored
@@ -1890,9 +1890,8 @@ declare module 'vscode' {
|
||||
export interface TimelineChangeEvent {
|
||||
/**
|
||||
* The [uri](#Uri) of the resource for which the timeline changed.
|
||||
* If the [uri](#Uri) is `undefined` that signals that the timeline source for all resources changed.
|
||||
*/
|
||||
uri?: Uri;
|
||||
uri: Uri;
|
||||
|
||||
/**
|
||||
* A flag which indicates whether the entire timeline should be reset.
|
||||
@@ -1933,7 +1932,7 @@ declare module 'vscode' {
|
||||
* An optional event to signal that the timeline for a source has changed.
|
||||
* To signal that the timeline for all resources (uris) has changed, do not pass any argument or pass `undefined`.
|
||||
*/
|
||||
onDidChange?: Event<TimelineChangeEvent>;
|
||||
onDidChange?: Event<TimelineChangeEvent | undefined>;
|
||||
|
||||
/**
|
||||
* An identifier of the source of the timeline items. This can be used to filter sources.
|
||||
|
||||
@@ -885,7 +885,7 @@ export interface MainThreadTunnelServiceShape extends IDisposable {
|
||||
export interface MainThreadTimelineShape extends IDisposable {
|
||||
$registerTimelineProvider(provider: TimelineProviderDescriptor): void;
|
||||
$unregisterTimelineProvider(source: string): void;
|
||||
$emitTimelineChangeEvent(e: TimelineChangeEvent): void;
|
||||
$emitTimelineChangeEvent(e: TimelineChangeEvent | undefined): void;
|
||||
}
|
||||
|
||||
// -- extension host
|
||||
|
||||
@@ -60,7 +60,7 @@ export class ExtHostTimeline implements IExtHostTimeline {
|
||||
|
||||
let disposable: IDisposable | undefined;
|
||||
if (provider.onDidChange) {
|
||||
disposable = provider.onDidChange(e => this._proxy.$emitTimelineChangeEvent({ ...e, id: provider.id }), this);
|
||||
disposable = provider.onDidChange(e => this._proxy.$emitTimelineChangeEvent({ uri: undefined, reset: true, ...e, id: provider.id }), this);
|
||||
}
|
||||
|
||||
const itemsBySourceAndUriMap = this._itemsBySourceAndUriMap;
|
||||
|
||||
@@ -359,9 +359,9 @@ export class TimelinePane extends ViewPane {
|
||||
}
|
||||
|
||||
if (this.isBodyVisible()) {
|
||||
this.updateTimeline(timeline, e.reset ?? false);
|
||||
this.updateTimeline(timeline, e.reset);
|
||||
} else {
|
||||
timeline.invalidate(e.reset ?? false);
|
||||
timeline.invalidate(e.reset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,8 +38,8 @@ export interface TimelineItem {
|
||||
|
||||
export interface TimelineChangeEvent {
|
||||
id: string;
|
||||
uri?: URI;
|
||||
reset?: boolean
|
||||
uri: URI | undefined;
|
||||
reset: boolean
|
||||
}
|
||||
|
||||
export interface TimelineOptions {
|
||||
|
||||
Reference in New Issue
Block a user