From d2d43db2c92d9200c96037218b62e7975343b16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Wed, 24 Feb 2021 18:27:40 +0100 Subject: [PATCH] Do not update time if top grid is invisible --- src/revealers.js | 2 +- src/widget.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/revealers.js b/src/revealers.js index 2f8f585b..beadd5d5 100644 --- a/src/revealers.js +++ b/src/revealers.js @@ -182,7 +182,7 @@ class ClapperRevealerTop extends CustomRevealer : Gtk.RevealerTransitionType.CROSSFADE; /* Changing transition in middle can have dire consequences, - so change only when not in transition */ + * so change only when not in transition */ if(this.reveal_child === this.child_revealed) this.transition_type = this._requestedTransition; } diff --git a/src/widget.js b/src/widget.js index 773cfdd1..c762bf66 100644 --- a/src/widget.js +++ b/src/widget.js @@ -333,7 +333,10 @@ class ClapperWidget extends Gtk.Grid updateTime() { - if(!this.revealerTop.visible) + if( + !this.revealerTop.visible + || !this.revealerTop.revealerGrid.visible + ) return null; const currTime = GLib.DateTime.new_now_local();