diff --git a/src/store/index.tsx b/src/store/index.tsx index bad1ba0..7bb6e9d 100644 --- a/src/store/index.tsx +++ b/src/store/index.tsx @@ -98,13 +98,14 @@ class RootStore { } @action - removeAllMessages() { + removeAllMessages(cb: () => void) { if ( (window as any).confirm('Remove all messages? (This cannot be undone)') ) { sendMainMessage('remove-all-messages'); - (window as any).alert('Messages successfully removed'); this.messages = []; + cb(); + this.addNotification('Messages successfully removed'); } } diff --git a/src/views/Chat.tsx b/src/views/Chat.tsx index eba44f5..f1298fe 100644 --- a/src/views/Chat.tsx +++ b/src/views/Chat.tsx @@ -141,8 +141,6 @@ const ChatView: FunctionComponent = (props) => { if (pmessage.type === 'relaunch-message') { chatState.selectionIsChecked = true; - console.log(pmessage.payload.selection); - store.selection = pmessage.payload.selection || {}; if (store.selectionCount) { diff --git a/src/views/Settings.tsx b/src/views/Settings.tsx index e445a34..72ece68 100644 --- a/src/views/Settings.tsx +++ b/src/views/Settings.tsx @@ -87,7 +87,7 @@ const SettingsView: FunctionComponent = (props) => { saveSettings()} + onBlur={() => saveSettings(false)} onChange={({ target }: any) => (settings.name = target.value.substr(0, 20)) } @@ -103,7 +103,7 @@ const SettingsView: FunctionComponent = (props) => { checked={settings.enableNotificationTooltip} onChange={() => { settings.enableNotificationTooltip = !settings.enableNotificationTooltip; - saveSettings(); + saveSettings(false); }} /> @@ -137,7 +137,7 @@ const SettingsView: FunctionComponent = (props) => {