Skip to content

Commit 1917639

Browse files
committed
Allow updating cloud value of read-only properties
1 parent 577f23a commit 1917639

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/property/PropertyContainer.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,22 @@ void updateProperty(PropertyContainer & prop_cont, String propertyName, unsigned
114114
{
115115
Property * property = getProperty(prop_cont, propertyName);
116116

117-
if (property && property->isWriteableByCloud())
117+
if (property )
118118
{
119+
/* Update _cloud_value */
119120
property->setLastCloudChangeTimestamp(cloudChangeEventTime);
120121
property->setAttributesFromCloud(map_data_list);
121-
if (is_sync_message) {
122-
property->execCallbackOnSync();
123-
} else {
124-
property->fromCloudToLocal();
125-
property->execCallbackOnChange();
126-
property->provideEcho();
122+
123+
/* Update _value */
124+
if (property->isWriteableByCloud())
125+
{
126+
if (is_sync_message) {
127+
property->execCallbackOnSync();
128+
} else {
129+
property->fromCloudToLocal();
130+
property->execCallbackOnChange();
131+
property->provideEcho();
132+
}
127133
}
128134
}
129135
}

0 commit comments

Comments
 (0)