💥 ags(control-center/pages): fix page not opening anymore if toggled twice on animation

This commit is contained in:
retrozinndev
2025-05-17 19:08:07 -03:00
parent 80ab4ce72d
commit 3db2a43aee
+3 -3
View File
@@ -54,11 +54,11 @@ class Pages extends Widget.Revealer {
return; return;
} }
if(newPage) this.open(newPage); newPage && this.open(newPage);
} }
open(newPage: Page, onOpened?: () => void) { open(newPage: Page, onOpened?: () => void) {
if(this.isOpen) return; if(this.get_child()) return;
this.page = newPage; this.page = newPage;
this.add(newPage); this.add(newPage);
@@ -67,7 +67,7 @@ class Pages extends Widget.Revealer {
} }
close(onClosed?: () => void): void { close(onClosed?: () => void): void {
if(!this.isOpen) return; if(!this.get_child()) return;
this.revealChild = false; this.revealChild = false;
timeout(this.transitionDuration, () => { timeout(this.transitionDuration, () => {