Do not update time if top grid is invisible

This commit is contained in:
Rafał Dzięgiel
2021-02-24 18:27:40 +01:00
parent b7b1dad81c
commit d2d43db2c9
2 changed files with 5 additions and 2 deletions

View File

@@ -182,7 +182,7 @@ class ClapperRevealerTop extends CustomRevealer
: Gtk.RevealerTransitionType.CROSSFADE; : Gtk.RevealerTransitionType.CROSSFADE;
/* Changing transition in middle can have dire consequences, /* 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) if(this.reveal_child === this.child_revealed)
this.transition_type = this._requestedTransition; this.transition_type = this._requestedTransition;
} }

View File

@@ -333,7 +333,10 @@ class ClapperWidget extends Gtk.Grid
updateTime() updateTime()
{ {
if(!this.revealerTop.visible) if(
!this.revealerTop.visible
|| !this.revealerTop.revealerGrid.visible
)
return null; return null;
const currTime = GLib.DateTime.new_now_local(); const currTime = GLib.DateTime.new_now_local();