Add Clear All Query History command/action (#7408)

* Add clear all query history action/command

* Fix display issue when clearing

* Change localize ID and fix registration
This commit is contained in:
Charles Gagnon
2019-09-30 08:20:27 -07:00
committed by GitHub
parent bca7c8e6bd
commit 7cbc268c52
10 changed files with 106 additions and 40 deletions

View File

@@ -21,5 +21,6 @@ export interface IQueryHistoryService {
getQueryHistoryInfos(): QueryHistoryInfo[];
deleteQueryHistoryInfo(info: QueryHistoryInfo): void;
clearQueryHistory(): void;
start(): void;
}

View File

@@ -78,6 +78,14 @@ export class QueryHistoryService extends Disposable implements IQueryHistoryServ
this._onInfosUpdated.fire(this._infos);
}
/**
* Clears all infos from the cache
*/
public clearQueryHistory() {
this._infos = [];
this._onInfosUpdated.fire(this._infos);
}
/**
* Method to force initialization of the service so that it can start tracking query events
*/