Skip to content

Commit 27ec4a9

Browse files
authored
Fix: Fixed issue where changing sort preferences didn't work properly when the sync option was on (#15228)
1 parent 19888bf commit 27ec4a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Files.App/Utils/Serialization/BaseJsonSettings.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ protected virtual bool Set<TValue>(TValue? value, [CallerMemberName] string prop
9595
return false;
9696
}
9797

98-
if (JsonSettingsDatabase?.SetValue(propertyName, value) ?? false)
98+
if (JsonSettingsDatabase is not null &&
99+
(!JsonSettingsDatabase.GetValue<TValue>(propertyName)?.Equals(value) ?? true) &&
100+
JsonSettingsDatabase.SetValue(propertyName, value))
99101
{
100102
RaiseOnSettingChangedEvent(this, new SettingChangedEventArgs(propertyName, value));
101103
return true;

0 commit comments

Comments
 (0)