From 29ddf87284fab0229fade98bd91d7f97e93b1596 Mon Sep 17 00:00:00 2001 From: Frangu Vlad Date: Sun, 29 Apr 2018 17:35:37 +0300 Subject: [PATCH] Don't show a timer on idle (#57) Not needed anyways, and buggy to say the least. --- src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index 44b1ebb..da24e01 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -239,7 +239,7 @@ function setActivity(workspaceElapsedTime: boolean = false): void { activity = { details: generateDetails('detailsDebugging', 'detailsEditing', 'detailsIdle'), state: generateDetails('lowerDetailsDebugging', 'lowerDetailsEditing', 'lowerDetailsIdle'), - startTimestamp: previousTimestamp && workspaceElapsedTime ? previousTimestamp : new Date().getTime() / 1000, + startTimestamp: window.activeTextEditor && previousTimestamp && workspaceElapsedTime ? previousTimestamp : window.activeTextEditor ? new Date().getTime() / 1000 : null, largeImageKey: largeImageKey ? largeImageKey.image || largeImageKey