titlebar: await windowMaximize promise instead of setTimeout race (P2-39)
This commit is contained in:
1 parent
169f5d686c
commit
ca9b94b5a6
1 file changed
+1
-2
@@ -37,8 +37,7 @@ export default function TitleBar() {
|
||||
aria-label={maximized ? "Restore" : "Maximize"}
|
||||
className="titlebar-button flex h-full w-[46px] items-center justify-center text-muted-foreground transition hover:bg-muted hover:text-foreground"
|
||||
onClick={() => {
|
||||
void window.agentCompany.windowMaximize();
|
||||
setTimeout(refreshMaximized, 50);
|
||||
void window.agentCompany.windowMaximize().then(refreshMaximized);
|
||||
}}
|
||||
>
|
||||
{maximized ? (
|
||||
|
||||
Reference in new issue
Block a user