Skip to content

Commit b5edd93

Browse files
committed
fix #1227
1 parent 1d36d15 commit b5edd93

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

core/Services/CalDAV.vala

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -765,21 +765,29 @@ public class Services.CalDAV : GLib.Object {
765765
}
766766

767767
public bool is_vtodo (GXml.DomElement element) {
768-
bool return_value = false;
768+
GXml.DomHTMLCollection propstat = element.get_elements_by_tag_name ("d:propstat");
769769

770-
GXml.DomElement propstat = element.get_elements_by_tag_name ("d:propstat").get_element (0);
771-
GXml.DomElement prop = propstat.get_elements_by_tag_name ("d:prop").get_element (0);
772-
GXml.DomHTMLCollection getcontenttype = prop.get_elements_by_tag_name ("d:getcontenttype");
770+
if (propstat.length <= 0) {
771+
return false;
772+
}
773+
774+
GXml.DomHTMLCollection prop = propstat.get_element (0).get_elements_by_tag_name ("d:prop");
775+
776+
if (prop.length <= 0) {
777+
return false;
778+
}
779+
780+
GXml.DomHTMLCollection getcontenttype = prop.get_element (0).get_elements_by_tag_name ("d:getcontenttype");
773781

774782
if (getcontenttype.length <= 0) {
775-
return return_value;
783+
return false;
776784
}
777785

778786
if (getcontenttype.get_element (0).text_content.index_of ("vtodo") > -1) {
779-
return_value = true;
787+
return true;
780788
}
781789

782-
return return_value;
790+
return false;
783791
}
784792

785793
/*

data/io.github.alainm23.planify.appdata.xml.in.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@
6767
<url type="donation">https://www.patreon.com/alainm23</url>
6868
<launchable type="desktop-id">@[email protected]</launchable>
6969
<releases>
70+
<release version="4.5.12" date="2024-03-29">
71+
<description translatable="no">
72+
<ul>
73+
<li>Fixed bug when syncing on Nextcloud.</li>
74+
<li>Dutch translation update thanks to @Gert-dev.</li>
75+
<li>Spanish translation update thanks to @haggen88.</li>
76+
<li>German translation update thanks to @bestlinuxgamers.</li>
77+
<li>Hindi translation update thanks to @Scrambled777.</li>
78+
</ul>
79+
</description>
80+
</release>
81+
7082
<release version="4.5.11" date="2024-03-28">
7183
<description translatable="no">
7284
<ul>

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project(
22
'io.github.alainm23.planify',
33
'vala', 'c',
4-
version: '4.5.11'
4+
version: '4.5.12'
55
)
66

77
gnome = import('gnome')

0 commit comments

Comments
 (0)