simplify if statements readabaility.

This commit is contained in:
Faris Armoush
2025-04-13 13:08:23 +03:00
parent c7c8898763
commit 6493f02bcc

View File

@ -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;