Skip to content

Commit 9e244ab

Browse files
committed
revert: time tracking
- reverted back to the previous version of the time tracking mechanism because the new version introduces a bug that blocks the timer
1 parent 0e51f1e commit 9e244ab

2 files changed

Lines changed: 1 addition & 14 deletions

File tree

apps/vscode-extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "mooncode",
33
"displayName": "MoonCode",
44
"description": "MoonCode is an extension that tracks your coding time (like WakaTime) and gives you a detailed summary about all your coding statistics. With MoonCode, developers get the full history of their coding activity.",
5-
"version": "0.0.46",
5+
"version": "0.0.47",
66
"icon": "./public/moon.png",
77
"publisher": "Friedrich482",
88
"author": {

apps/vscode-extension/src/utils/files/updateFilesDataAfterSync.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,16 @@
1-
import * as vscode from "vscode";
2-
31
import { filesData } from "@/constants";
42
import type { AppRouter } from "@repo/trpc/router";
53

6-
import getCurrentFileProperties from "./getCurrentFileProperties";
7-
84
const updateFilesDataAfterSync = (
95
files: Awaited<ReturnType<AppRouter["extension"]["upsertFiles"]>>,
106
) => {
117
const now = performance.now();
128

13-
const currentFile = getCurrentFileProperties(
14-
vscode.window.activeTextEditor?.document,
15-
);
16-
179
Object.keys(files).forEach((filePath) => {
1810
const file = files[filePath];
1911

2012
if (filesData[filePath]) {
2113
filesData[filePath].elapsedTime = file.timeSpent;
22-
23-
if (currentFile && filePath === currentFile.absolutePath) {
24-
filesData[filePath].startTime = now - file.timeSpent * 1000;
25-
}
26-
2714
return;
2815
}
2916

0 commit comments

Comments
 (0)