mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
simplify if statements readabaility.
This commit is contained in:
@ -78,14 +78,11 @@ class _SidebarWidgetState extends State<SidebarWidget> {
|
||||
}
|
||||
|
||||
bool _isSpaceOrChildSelected(SpaceModel space) {
|
||||
if (_selectedSpaceUuid == space.uuid) {
|
||||
return true;
|
||||
}
|
||||
if (_selectedSpaceUuid == space.uuid) return true;
|
||||
|
||||
|
||||
for (var child in space.children) {
|
||||
if (_isSpaceOrChildSelected(child)) {
|
||||
return true;
|
||||
}
|
||||
if (_isSpaceOrChildSelected(child)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user