diff options
author | Alexander Mikhaylenko <alexm@gnome.org> | 2022-08-12 17:22:32 +0400 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2022-08-12 16:32:24 +0000 |
commit | a65f1a87b6fd43986e3f76db6982dd7fdf91d3a6 (patch) | |
tree | d97a7c85d920771d34ca18eb828bf4497ff44196 /src | |
parent | 9094c98fc3f85da0ad03aeec52f511c584ca2401 (diff) | |
download | gnome-contacts-a65f1a87b6fd43986e3f76db6982dd7fdf91d3a6.tar.gz |
main-window: Unselect sidebar item in a less janky way
Don't wait for the animation to end, just do it on visible-child changes
instead. Do it when folding while on the contact list pane as well.
Diffstat (limited to 'src')
-rw-r--r-- | src/contacts-main-window.vala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/contacts-main-window.vala b/src/contacts-main-window.vala index fdffed7..f6f465c 100644 --- a/src/contacts-main-window.vala +++ b/src/contacts-main-window.vala @@ -369,12 +369,13 @@ public class Contacts.MainWindow : Adw.ApplicationWindow { [GtkCallback] private void on_folded () { update_header (); + on_visible_child (); } [GtkCallback] - private void on_child_transition_running () { - if (!this.content_box.child_transition_running && - this.content_box.visible_child == this.list_pane_page) + private void on_visible_child () { + if (this.content_box.folded && + this.content_box.visible_child == this.list_pane_page) this.store.selection.unselect_item (this.store.selection.get_selected ()); } |