Browse Source

fix(desktop): update server removal logic to clear default server URL if removed (#12372)

OpeOginni 3 weeks ago
parent
commit
400bc7973a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/app/src/components/dialog-select-server.tsx

+ 3 - 0
packages/app/src/components/dialog-select-server.tsx

@@ -369,6 +369,9 @@ export function DialogSelectServer() {
 
   async function handleRemove(url: string) {
     server.remove(url)
+    if (await platform.getDefaultServerUrl?.() === url) {
+      platform.setDefaultServerUrl?.(null)
+    }
   }
 
   return (