diff --git a/package-lock.json b/package-lock.json index 3e86047..4b2019a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "discord-vscode", - "version": "5.3.0", + "version": "5.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "5.3.0", + "version": "5.4.0", "license": "MIT", "dependencies": { "bufferutil": "^4.0.3", diff --git a/package.json b/package.json index aa83f8e..8e3a515 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "discord-vscode", "displayName": "Discord Presence", - "version": "5.3.0", + "version": "5.4.0", "description": "Update your discord status with a rich presence.", "private": true, "author": { @@ -139,6 +139,11 @@ "type": "boolean", "default": false, "description": "Removes the lower details" + }, + "discord.removeTimestamp": { + "type": "boolean", + "default": false, + "description": "Removes the timestamp" } } } diff --git a/src/activity.ts b/src/activity.ts index af18364..3c458db 100644 --- a/src/activity.ts +++ b/src/activity.ts @@ -55,7 +55,7 @@ export async function activity(previous: ActivityPayload = {}) { details: removeDetails ? undefined : await details(CONFIG_KEYS.DetailsIdling, CONFIG_KEYS.DetailsEditing, CONFIG_KEYS.DetailsDebugging), - startTimestamp: previous.startTimestamp ?? Date.now(), + startTimestamp: config[CONFIG_KEYS.RemoveTimestamp] ? undefined : previous.startTimestamp ?? Date.now(), largeImageKey: IDLE_IMAGE_KEY, largeImageText: defaultLargeImageText, smallImageKey: defaultSmallImageKey, diff --git a/src/constants.ts b/src/constants.ts index b2ac929..1064b23 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -55,4 +55,5 @@ export const enum CONFIG_KEYS { SwapBigAndSmallImage = 'swapBigAndSmallImage', RemoveDetails = 'removeDetails', RemoveLowerDetails = 'removeLowerDetails', + RemoveTimestamp = 'removeTimestamp', } diff --git a/src/util.ts b/src/util.ts index 0a6c987..4e55b7d 100644 --- a/src/util.ts +++ b/src/util.ts @@ -20,6 +20,7 @@ type WorkspaceExtensionConfiguration = WorkspaceConfiguration & { swapBigAndSmallImage: boolean; removeDetails: boolean; removeLowerDetails: boolean; + removeTimestamp: boolean; }; export function getConfig() {