From ab3569e104a4455c6a5eab370b1417513b30eed8 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 30 Nov 2022 11:18:23 +0100 Subject: [PATCH] Close settings dialog when disconnecting --- components/app.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/app.js b/components/app.js index 8b9bbce..29b24a0 100644 --- a/components/app.js +++ b/components/app.js @@ -225,6 +225,7 @@ export default class App extends Component { this.handleVerifySubmit = this.handleVerifySubmit.bind(this); this.handleOpenSettingsClick = this.handleOpenSettingsClick.bind(this); this.handleSettingsChange = this.handleSettingsChange.bind(this); + this.handleSettingsDisconnect = this.handleSettingsDisconnect.bind(this); this.state.settings = { ...this.state.settings, @@ -1845,6 +1846,11 @@ export default class App extends Component { this.setState({ settings }); } + handleSettingsDisconnect() { + this.dismissDialog(); + this.disconnectAll(); + } + componentDidMount() { this.baseTitle = document.title; setupKeybindings(this); @@ -2026,8 +2032,8 @@ export default class App extends Component { settings=${this.state.settings} showProtocolHandler=${dialogData.showProtocolHandler} onChange=${this.handleSettingsChange} - onDisconnect=${() => this.disconnectAll()} - onClose=${() => this.dismissDialog()} + onDisconnect=${this.handleSettingsDisconnect} + onClose=${this.dismissDialog} /> `;