feat: detect stable or insiders
This commit is contained in:
parent
7db6c051b4
commit
73a0f509db
2 changed files with 4 additions and 3 deletions
|
@ -91,7 +91,7 @@
|
|||
},
|
||||
"discord.smallImage": {
|
||||
"type": "string",
|
||||
"default": "Visual Studio Code",
|
||||
"default": "{appname}",
|
||||
"description": "Custom string for the smallImageText section of the rich presence"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ import { Client } from 'discord-rpc';
|
|||
import { basename, extname } from 'path';
|
||||
import { setInterval, clearInterval } from 'timers';
|
||||
import {
|
||||
env,
|
||||
ExtensionContext,
|
||||
commands,
|
||||
window,
|
||||
|
@ -183,8 +184,8 @@ function setActivity(): void {
|
|||
largeImageText: window.activeTextEditor
|
||||
? config.get('largeImage') || window.activeTextEditor.document.languageId
|
||||
: config.get('largeImageIdle'),
|
||||
smallImageKey: 'vscode',
|
||||
smallImageText: config.get('smallImage'),
|
||||
smallImageKey: env.appName.includes('Insiders') ? 'vscode-insiders' : 'vscode',
|
||||
smallImageText: config.get('smallImage').replace('{appname}', env.appName),
|
||||
instance: false
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue