fix: fallback to a normal file icon if no language is found

This commit is contained in:
iCrawl 2017-11-23 21:14:56 +01:00
parent 2d16ba2f32
commit 29420acbec
No known key found for this signature in database
GPG key ID: E41A6DB922EC2CFE

View file

@ -23,7 +23,7 @@ function setActivity(rpc: Client): void {
details: window.activeTextEditor ? `Editing ${basename(window.activeTextEditor.document.fileName)}` : 'Idle.',
state: window.activeTextEditor ? `Workspace: ${workspace.getWorkspaceFolder(window.activeTextEditor.document.uri).name}` : 'Idling.',
startTimestamp: new Date().getTime() / 1000,
largeImageKey: window.activeTextEditor ? extname(basename(window.activeTextEditor.document.fileName)).substring(1) || basename(window.activeTextEditor.document.fileName).substring(1) || 'vscode-big' : 'vscode-big',
largeImageKey: window.activeTextEditor ? extname(basename(window.activeTextEditor.document.fileName)).substring(1) || basename(window.activeTextEditor.document.fileName).substring(1) || 'file' : 'vscode-big',
largeImageText: window.activeTextEditor ? window.activeTextEditor.document.languageId : 'Idling.',
smallImageKey: 'vscode',
smallImageText: 'Visual Studio Code',