File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -370,16 +370,16 @@ public class Services.CalDAV.CalDAVClient : Services.CalDAV.WebDAVClient {
370370 }
371371 }
372372 }
373-
374- var sync_token = propstat.get_first_prop_with_tagname (" sync- token" );
375- if (sync_token != null) {
376- project.sync_id = sync_token.text_content;
377- project.update_local ();
378- }
379373 }
380374 }
381375 }
382376
377+ var sync_token = multi_status.get_first_text_content_by_tag_name (" sync- token" );
378+ if (sync_token != null && sync_token != project.sync_id) {
379+ project.sync_id = sync_token;
380+ project.update_local ();
381+ }
382+
383383 project.loading = false;
384384 }
385385
Original file line number Diff line number Diff line change @@ -143,6 +143,17 @@ public class Services.CalDAV.WebDAVMultiStatus : Object {
143143 }
144144 return list;
145145 }
146+
147+ public string ? get_first_text_content_by_tag_name (string tag_name ) {
148+ foreach (var h in root. get_elements_by_tag_name (tag_name)) {
149+ var text = h. text_content. strip ();
150+ if (text != null && text. length > 0 ) {
151+ return text;
152+ }
153+ }
154+
155+ return null ;
156+ }
146157}
147158
148159
You can’t perform that action at this time.
0 commit comments