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"}
|
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"
|
className="titlebar-button flex h-full w-[46px] items-center justify-center text-muted-foreground transition hover:bg-muted hover:text-foreground"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
void window.agentCompany.windowMaximize();
|
void window.agentCompany.windowMaximize().then(refreshMaximized);
|
||||||
setTimeout(refreshMaximized, 50);
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{maximized ? (
|
{maximized ? (
|
||||||
|
|||||||
Reference in new issue
Block a user