Skip to content

Commit babad89

Browse files
authored
Merge pull request #378 from pennam/onchange-cbk
Avoid calling onchange callback on sync event if property isn't changed
2 parents 6a9acc2 + a4d0fbc commit babad89

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
@@ -386,8 +386,10 @@ void onAutoSync(Property & property) {
386386
}
387387

388388
void onForceCloudSync(Property & property) {
389-
property.fromCloudToLocal();
390-
property.execCallbackOnChange();
389+
if (property.isDifferentFromCloud()) {
390+
property.fromCloudToLocal();
391+
property.execCallbackOnChange();
392+
}
391393
}
392394

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

0 commit comments

Comments
 (0)