Improvement
This commit is contained in:
parent
ccb9666668
commit
8d5f9bd3c8
|
@ -14,11 +14,10 @@ namespace Syntriax.Modules.ToggleState
|
|||
get => _isToggled;
|
||||
set
|
||||
{
|
||||
bool oldValue = _isToggled;
|
||||
if (value == _isToggled)
|
||||
return;
|
||||
|
||||
_isToggled = value;
|
||||
|
||||
if (oldValue != value)
|
||||
OnToggleStateChanged?.Invoke(value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,10 @@ namespace Syntriax.Modules.ToggleState
|
|||
get => _isToggled;
|
||||
set
|
||||
{
|
||||
bool oldValue = _isToggled;
|
||||
if (value == _isToggled)
|
||||
return;
|
||||
|
||||
_isToggled = value;
|
||||
|
||||
if (oldValue != value)
|
||||
OnToggleStateChanged?.Invoke(value);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue