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