[geary/mjog/info-bar-cleanup: 2/3] Components.InfoBarStack::remove_all: Don't update state if not needed
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/info-bar-cleanup: 2/3] Components.InfoBarStack::remove_all: Don't update state if not needed
- Date: Thu, 2 Apr 2020 22:41:47 +0000 (UTC)
commit 2bc984e2da109f3e931f2d5bffd12550fac4c035
Author: Michael Gratton <mike vee net>
Date: Fri Apr 3 09:28:51 2020 +1100
Components.InfoBarStack::remove_all: Don't update state if not needed
No point updating the wiget's state if there's nothing to remove.
src/client/components/components-info-bar-stack.vala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/client/components/components-info-bar-stack.vala
b/src/client/components/components-info-bar-stack.vala
index bd91fbf0..2c5d896b 100644
--- a/src/client/components/components-info-bar-stack.vala
+++ b/src/client/components/components-info-bar-stack.vala
@@ -136,8 +136,10 @@ public class Components.InfoBarStack : Gtk.Frame, Geary.BaseInterface {
* Removes all info bars from the stack, hiding the stack.
*/
public new void remove_all() {
- this.available.clear();
- update();
+ if (!this.available.is_empty) {
+ this.available.clear();
+ update();
+ }
}
private void update() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]