Baseflow / Baseflow/Xamarin-Sidebar
Bug in SidebarController.IsOpen
- Dominant language
- C#
- Stars
- 112
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Looks like the code has the sense of the boolean inverted. If I set `IsOpen= true`, the menu should open, not close.
```
public bool IsOpen
{
get { return _sidebar.IsOpen; }
set
{
_sidebar.IsOpen = value;
if (_sidebar.IsOpen)
CloseMenu();
else
OpenMenu();
}
}
```
Also, setting `_sidebar.IsOpen` prevents the opening. So the code should simply read:
```
public bool IsOpen
{
get { return _sidebar.IsOpen; }
set
{
if (value)
_sidebar.OpenMenu();
else
_sidebar.CloseMenu();
}
}
```
Is this correct?
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.