Skip to content

Commit

Permalink
fix: connection default icon not change after client change
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Dec 3, 2022
1 parent dd971d7 commit a6bdf69
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/renderer/stores/connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,25 @@ export const useConnectionsStore = defineStore('connections', {
if (conn.uid === connection.uid) return connection;
return conn;
});

this.connections = editedConnections;
persistentStore.set('connections', this.connections);

const editedConnectionsOrder = (this.connectionsOrder as SidebarElement[]).map(conn => {
if (conn.uid === connection.uid) {
return {
isFolder: false,
uid: connection.uid,
client: connection.client,
icon: conn.icon,
name: conn.name
};
}
return conn;
});

this.connectionsOrder = editedConnectionsOrder;
persistentStore.set('connectionsOrder', this.connectionsOrder);
},
updateConnections (connections: ConnectionParams[]) {
this.connections = connections;
Expand Down

0 comments on commit a6bdf69

Please sign in to comment.