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