[gnome-contacts] main-window: Drop the current contact after the transition
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] main-window: Drop the current contact after the transition
- Date: Sat, 3 Sep 2022 08:25:12 +0000 (UTC)
commit 1321e8b60b317db59a90d0ae511567e737740222
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Aug 18 17:21:19 2022 +0200
main-window: Drop the current contact after the transition
This avoids the current contact to instantaneously disappear as the
transition is running or as we the user is swiping back, and close the
contact only once the contact pane is hidden.
data/ui/contacts-main-window.ui | 1 +
src/contacts-main-window.vala | 1 +
2 files changed, 2 insertions(+)
---
diff --git a/data/ui/contacts-main-window.ui b/data/ui/contacts-main-window.ui
index 482c7ac5..3d01bdc7 100644
--- a/data/ui/contacts-main-window.ui
+++ b/data/ui/contacts-main-window.ui
@@ -62,6 +62,7 @@
<child>
<object class="AdwLeaflet" id="content_box">
<property name="can-navigate-back">True</property>
+ <signal name="notify::child-transition-running" handler="on_visible_child"/>
<signal name="notify::folded" handler="on_folded"/>
<signal name="notify::visible-child" handler="on_visible_child"/>
diff --git a/src/contacts-main-window.vala b/src/contacts-main-window.vala
index 3c755e7b..4ba54806 100644
--- a/src/contacts-main-window.vala
+++ b/src/contacts-main-window.vala
@@ -375,6 +375,7 @@ public class Contacts.MainWindow : Adw.ApplicationWindow {
[GtkCallback]
private void on_visible_child () {
if (this.content_box.folded &&
+ !this.content_box.child_transition_running &&
this.content_box.visible_child == this.list_pane_page)
this.store.selection.unselect_item (this.store.selection.get_selected ());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]