mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
Don't update view if settings were not changed (#10407)
This commit is contained in:
@@ -23,5 +23,16 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
// By default JsonSerializer will only serialize the properties in the base class. This can be avoided by passing the object type (more details at https://stackoverflow.com/a/62498888)
|
||||
return JsonSerializer.Serialize(this, GetType());
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return ToJsonString().GetHashCode();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
var settings = obj as BasePTModuleSettings;
|
||||
return settings?.ToJsonString() == ToJsonString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user