Skip to content

Commit

Permalink
fix(relaunch): fix message on relaunch
Browse files Browse the repository at this point in the history
  • Loading branch information
ph1p committed Feb 6, 2020
1 parent eedc1b8 commit 33346fe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"relaunchButtons": [
{
"command": "relaunch",
"name": "Send to chat",
"name": "Send selection to chat",
"multipleSelection": true
}
]
Expand Down
2 changes: 2 additions & 0 deletions src/Ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ const init = serverUrl => {
room: state.roomName,
settings: state.settings
});

sendMainMessage('ask-for-relaunch-message');
});

socket.on('connect_error', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''
});
}
});
Expand Down
2 changes: 0 additions & 2 deletions src/views/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ const ChatView: FunctionComponent<ChatProps> = props => {
state.selection = selection;

state.persistSettings(settings, props.socket);

sendMainMessage('ask-for-relaunch-message');
}

if (pmessage.type === 'relaunch-message') {
Expand Down

0 comments on commit 33346fe

Please sign in to comment.