mirror of
https://gitlab.com/aviortheking/code-stats-vscode.git
synced 2025-08-11 02:31:58 +00:00
Reset XP counter when API call is accepted
This commit is contained in:
committed by
Juha Ristolainen
parent
ac731b06ed
commit
23466f311e
@@ -63,7 +63,13 @@ export class XpCounter {
|
||||
}
|
||||
|
||||
this.updateTimeout = setTimeout(() => {
|
||||
this.api.sendUpdate(this.pulse);
|
||||
const promise = this.api.sendUpdate(this.pulse);
|
||||
|
||||
if (promise !== null) {
|
||||
promise.then(() => {
|
||||
this.updateStatusBar(show, `${this.pulse.getXP(document.languageId)}`);
|
||||
});
|
||||
}
|
||||
}, this.UPDATE_DELAY);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user