Skip to content

Commit a4d0fbc

Browse files
committed
Avoid calling onchange callback on sync event if property isn't changed
1 parent b4f5275 commit a4d0fbc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/property/Property.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,10 @@ void onAutoSync(Property & property) {
394394
}
395395

396396
void onForceCloudSync(Property & property) {
397-
property.fromCloudToLocal();
398-
property.execCallbackOnChange();
397+
if (property.isDifferentFromCloud()) {
398+
property.fromCloudToLocal();
399+
property.execCallbackOnChange();
400+
}
399401
}
400402

401403
void onForceDeviceSync(Property & /* property */) {

0 commit comments

Comments
 (0)