Skip to content

Commit

Permalink
Fixing the issue with updating the TrayMenu upon connection
Browse files Browse the repository at this point in the history
رفع مشکل بروزشدن TrayMenu هنگام اتصال
  • Loading branch information
ircfspace committed Jan 1, 2025
1 parent fc89671 commit 7e1d6fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/lib/wpManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class WarpPlusManager {
break;

case ConnectionState.DISCONNECTING:
customEvent.emit('tray-icon', 'connecting');
customEvent.emit('tray-icon', 'disconnecting');
break;

case ConnectionState.CONNECTED:
Expand Down
9 changes: 8 additions & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,14 @@ class OblivionDesktop {
label: connectLabel,
type: 'normal',
enabled: canToggleConnection,
click: () => this.handleConnectionToggle()
click: () => {
this.handleConnectionToggle();
this.state.connectionStatus =
this.state.connectionStatus === 'disconnected'
? 'connecting'
: 'disconnecting';
this.updateTrayMenu();
}
},
{
label: this.state.appLang.systemTray.settings,
Expand Down

0 comments on commit 7e1d6fc

Please sign in to comment.