Add back IDisposable implementation in TimeBasedDebouncer for the ease of interoperability with RenderDebouncer

This commit is contained in:
Samuel Sampson
2021-07-29 20:20:02 +00:00
parent 4a9ecb33bd
commit 732927b0e2
+5 -1
View File
@@ -5,10 +5,12 @@
const RENDER_DEBOUNCE_THRESHOLD_MS = 1000; // 1 Second
import { IDisposable } from 'common/Types';
/**
* Debounces calls to update screen readers to update at most once per second.
*/
export class TimeBasedDebouncer {
export class TimeBasedDebouncer implements IDisposable {
private _rowStart: number | undefined;
private _rowEnd: number | undefined;
private _rowCount: number | undefined;
@@ -23,6 +25,8 @@ export class TimeBasedDebouncer {
) {
}
public dispose(): void {}
public refresh(rowStart: number | undefined, rowEnd: number | undefined, rowCount: number): void {
this._rowCount = rowCount;
// Get the min/max row start/end for the arg values