mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Removed community view
This commit is contained in:
@ -14,10 +14,11 @@ import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
import 'package:syncrow_web/utils/style.dart';
|
||||
|
||||
class SidebarWidget extends StatefulWidget {
|
||||
final Function(String)? onCommunitySelected;
|
||||
final Function(CommunityModel)? onCommunitySelected;
|
||||
final List<CommunityModel> communities;
|
||||
|
||||
const SidebarWidget({super.key, this.onCommunitySelected, required this.communities});
|
||||
const SidebarWidget(
|
||||
{super.key, this.onCommunitySelected, required this.communities});
|
||||
|
||||
@override
|
||||
_SidebarWidgetState createState() => _SidebarWidgetState();
|
||||
@ -185,6 +186,9 @@ class _SidebarWidgetState extends State<SidebarWidget> {
|
||||
debugPrint(
|
||||
'CommunityTile onExpansionChanged called for $title, expanded: $expanded');
|
||||
_handleExpansionChange(community.uuid, expanded);
|
||||
if (widget.onCommunitySelected != null) {
|
||||
widget.onCommunitySelected!(community); // Pass the entire community
|
||||
}
|
||||
},
|
||||
children: hasChildren
|
||||
? community.spaces.map((space) => _buildSpaceTile(space)).toList()
|
||||
|
Reference in New Issue
Block a user