From 4d72a15bd8555715eecedd3fc9fb165407652d8d Mon Sep 17 00:00:00 2001 From: iCrawl Date: Thu, 23 Nov 2017 22:17:11 +0100 Subject: [PATCH] style: newline ternaries for readability --- src/extension.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index cf8d3f4..2e905e8 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -24,11 +24,21 @@ export function deactivate(context: ExtensionContext) { function setActivity(): void { if (!rpc) return; const activity = { - details: window.activeTextEditor ? `Editing ${basename(window.activeTextEditor.document.fileName)}` : 'Idle.', - state: window.activeTextEditor ? `Workspace: ${workspace.getWorkspaceFolder(window.activeTextEditor.document.uri).name}` : 'Idling.', + 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) || 'file' : 'vscode-big', - largeImageText: window.activeTextEditor ? window.activeTextEditor.document.languageId : 'Idling.', + 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', instance: false