From 33346fe65e02fa6eb3f23590570ce6373f4f83c6 Mon Sep 17 00:00:00 2001 From: ph1p Date: Thu, 6 Feb 2020 19:39:42 +0100 Subject: [PATCH] fix(relaunch): fix message on relaunch --- package.json | 2 +- src/Ui.tsx | 2 ++ src/code.ts | 2 +- src/views/Chat.tsx | 2 -- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c51e31d..9435ca3 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "relaunchButtons": [ { "command": "relaunch", - "name": "Send to chat", + "name": "Send selection to chat", "multipleSelection": true } ] diff --git a/src/Ui.tsx b/src/Ui.tsx index ef7118e..40d33eb 100644 --- a/src/Ui.tsx +++ b/src/Ui.tsx @@ -57,6 +57,8 @@ const init = serverUrl => { room: state.roomName, settings: state.settings }); + + sendMainMessage('ask-for-relaunch-message'); }); socket.on('connect_error', () => { diff --git a/src/code.ts b/src/code.ts index 5392f3e..73b4e9a 100644 --- a/src/code.ts +++ b/src/code.ts @@ -112,7 +112,7 @@ main().then(({ roomName, secret, history, instanceId }) => { iterateOverFile(figma.root, node => { if (node.setRelaunchData && isValidShape(node)) { node.setRelaunchData({ - relaunch: 'Send selection to chat' + relaunch: '' }); } }); diff --git a/src/views/Chat.tsx b/src/views/Chat.tsx index 2d1f3bd..3b1b27c 100644 --- a/src/views/Chat.tsx +++ b/src/views/Chat.tsx @@ -117,8 +117,6 @@ const ChatView: FunctionComponent = props => { state.selection = selection; state.persistSettings(settings, props.socket); - - sendMainMessage('ask-for-relaunch-message'); } if (pmessage.type === 'relaunch-message') {