[gnome-contacts/gnome-3-38] app: Fixes show_individual when store is not ready



commit 71cc6e9159dea72bc9ebdaf5f0504ef1c7fd139f
Author: Andres Reyes Monge <andres.reyes@vui.agency>
Date:   Wed Oct 21 15:21:06 2020 +0200

    app: Fixes show_individual when store is not ready
    
    (cherry picked from commit c33933b7a09bf6c112c0cc8164804d5b9344fff3)

 src/contacts-app.vala | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index b93f92b6..082449ad 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -88,6 +88,16 @@ public class Contacts.App : Gtk.Application {
   }
 
   public async void show_individual (string id) {
+    if (contacts_store.is_quiescent) {
+      show_individual_ready.begin (id);
+    } else {
+      contacts_store.quiescent.connect( () => {
+        show_individual_ready.begin (id);
+      });
+    }
+  }
+
+  private async void show_individual_ready (string id) {
     Individual? contact = null;
     try {
       contact = yield contacts_store.aggregator.look_up_individual (id);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]