style: newline ternaries for readability

This commit is contained in:
iCrawl 2017-11-23 22:17:11 +01:00
parent 1a185bf563
commit 4d72a15bd8
No known key found for this signature in database
GPG key ID: E41A6DB922EC2CFE

View file

@ -24,11 +24,21 @@ export function deactivate(context: ExtensionContext) {
function setActivity(): void { function setActivity(): void {
if (!rpc) return; if (!rpc) return;
const activity = { const activity = {
details: window.activeTextEditor ? `Editing ${basename(window.activeTextEditor.document.fileName)}` : 'Idle.', details: window.activeTextEditor
state: window.activeTextEditor ? `Workspace: ${workspace.getWorkspaceFolder(window.activeTextEditor.document.uri).name}` : 'Idling.', ? `Editing ${basename(window.activeTextEditor.document.fileName)}`
: 'Idle.',
state: window.activeTextEditor
? `Workspace: ${workspace.getWorkspaceFolder(window.activeTextEditor.document.uri).name}`
: 'Idling.',
startTimestamp: new Date().getTime() / 1000, 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', largeImageKey: window.activeTextEditor
largeImageText: window.activeTextEditor ? window.activeTextEditor.document.languageId : 'Idling.', ? 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', smallImageKey: 'vscode',
smallImageText: 'Visual Studio Code', smallImageText: 'Visual Studio Code',
instance: false instance: false