Removed community view

This commit is contained in:
hannathkadher
2024-10-11 10:46:30 +04:00
parent 29a1470428
commit cd957ed1c7
4 changed files with 12 additions and 149 deletions

View File

@ -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()