fix: connection default icon not change after client change

This commit is contained in:
Fabio Di Stasio 2022-12-03 17:53:00 +01:00
parent dd971d70e0
commit a6bdf69a28
1 changed files with 17 additions and 0 deletions

View File

@ -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;