[folks] Replaced use of EVCard.remove_attribute to EVCard.remove_attributes.



commit 87e037787476ba645ced4b8d6a406b32f7dbfae0
Author: Renato Araujo Oliveira Filho <renato filho canonical com>
Date:   Thu Feb 20 18:21:27 2014 -0300

    Replaced use of EVCard.remove_attribute to EVCard.remove_attributes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724809

 NEWS                                     |    1 +
 backends/eds/lib/edsf-persona-store.vala |   14 +++++---------
 2 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/NEWS b/NEWS
index 6d393ef..333ac05 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ Bugs fixed:
    not supported for this expression
  • Bug 723540 — standalone-individuals test failing with master
  • Bug 724339 — vala.m4: don't keep generated files in git
+ • Bug 724809 — Fail to unset contact favorite
 
 API changes:
  • Add Individual.display_name
diff --git a/backends/eds/lib/edsf-persona-store.vala b/backends/eds/lib/edsf-persona-store.vala
index c27565b..ce4f00d 100644
--- a/backends/eds/lib/edsf-persona-store.vala
+++ b/backends/eds/lib/edsf-persona-store.vala
@@ -1325,11 +1325,7 @@ public class Edsf.PersonaStore : Folks.PersonaStore
 
   private void _remove_attribute (E.Contact contact, string attr_name)
     {
-      unowned VCardAttribute? attr = contact.get_attribute (attr_name);
-      if (attr != null)
-        {
-          contact.remove_attribute ((!) attr);
-        }
+      contact.remove_attributes (null, attr_name);
     }
 
   internal async void _set_avatar (Edsf.Persona persona, LoadableIcon? avatar)
@@ -2064,14 +2060,14 @@ public class Edsf.PersonaStore : Folks.PersonaStore
 
   private void _set_contact_system_groups (E.Contact contact, Set<string> system_groups)
     {
+      var group_ids_str = "X-GOOGLE-SYSTEM-GROUP-IDS";
       var vcard = (E.VCard) contact;
-      unowned E.VCardAttribute? prev_attr =
-          vcard.get_attribute ("X-GOOGLE-SYSTEM-GROUP-IDS");
+      unowned E.VCardAttribute? prev_attr = vcard.get_attribute (group_ids_str);
 
       if (prev_attr != null)
-        contact.remove_attribute (prev_attr);
+        contact.remove_attributes (null, group_ids_str);
 
-      E.VCardAttribute new_attr = new E.VCardAttribute ("", "X-GOOGLE-SYSTEM-GROUP-IDS");
+      E.VCardAttribute new_attr = new E.VCardAttribute ("", group_ids_str);
       foreach (var group in system_groups)
         {
           if (group == null || group == "")


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