Skip to content

Commit

Permalink
Avoid calling onchange callback on sync event if property isn't changed
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam committed Sep 20, 2023
1 parent b4f5275 commit a4d0fbc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/property/Property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,10 @@ void onAutoSync(Property & property) {
}

void onForceCloudSync(Property & property) {
property.fromCloudToLocal();
property.execCallbackOnChange();
if (property.isDifferentFromCloud()) {
property.fromCloudToLocal();
property.execCallbackOnChange();
}
}

void onForceDeviceSync(Property & /* property */) {
Expand Down

0 comments on commit a4d0fbc

Please sign in to comment.