diff --git a/src/app/app.ts b/src/app/app.ts index 1657c09..cb64d2a 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -70,6 +70,8 @@ export default class Enclave { isSecure, publicKey: base58.encode(this.server.serverPublicKey), }; + + this.forceRender(); } public getClientSecretKey() { diff --git a/src/components/view/serverList.tsx b/src/components/view/serverList.tsx index 025c4af..2ff8bc8 100644 --- a/src/components/view/serverList.tsx +++ b/src/components/view/serverList.tsx @@ -17,7 +17,7 @@ export default function ServerList({ src={getHTTPUrl(hostname, server.isSecure, "/icon")} key={hostname} className={ - server.publicKey === appRef.current?.server?.hostname + hostname === appRef.current?.server?.hostname ? "rounded-lg" : "rounded-full" } @@ -44,8 +44,6 @@ export default function ServerList({ appRef.current.connectToServer(hostname, isSecure).then(() => { if (!appRef.current) return; - appRef.current.forceRender(); - saveServerList(appRef.current.serverList); }); }}