mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-25 10:50:40 +01:00
Merge branch 'braid/spaces-fix' into 'main'
fix: spces bottom sheet not scrollable See merge request famedly/fluffychat!850
This commit is contained in:
commit
f492a7a4a2
@ -29,54 +29,55 @@ class SpacesDrawer extends StatelessWidget {
|
|||||||
controller.snapBackSpacesSheet();
|
controller.snapBackSpacesSheet();
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
child: ListView.builder(
|
child: Column(
|
||||||
shrinkWrap: true,
|
children: List.generate(
|
||||||
itemCount: spaceHierarchy.length,
|
spaceHierarchy.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
(index) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
selected: currentIndex == index,
|
selected: currentIndex == index,
|
||||||
leading: const Icon(Icons.keyboard_arrow_down),
|
leading: const Icon(Icons.keyboard_arrow_down),
|
||||||
title: Text(L10n.of(context)!.allChats),
|
title: Text(L10n.of(context)!.allChats),
|
||||||
onTap: () => controller.setActiveSpacesEntry(
|
onTap: () => controller.setActiveSpacesEntry(
|
||||||
context,
|
context,
|
||||||
null,
|
null,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
final space = spaceHierarchy.keys.toList()[index];
|
final space = spaceHierarchy.keys.toList()[index];
|
||||||
final room = space.getSpace(context)!;
|
final room = space.getSpace(context)!;
|
||||||
return ListTile(
|
return ListTile(
|
||||||
selected: currentIndex == index,
|
selected: currentIndex == index,
|
||||||
leading: Avatar(
|
leading: Avatar(
|
||||||
mxContent: room.avatar,
|
mxContent: room.avatar,
|
||||||
name: space.getName(context),
|
name: space.getName(context),
|
||||||
size: 24,
|
size: 24,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
),
|
),
|
||||||
title: Text(space.getName(context)),
|
title: Text(space.getName(context)),
|
||||||
subtitle: room.topic.isEmpty
|
subtitle: room.topic.isEmpty
|
||||||
? null
|
? null
|
||||||
: Tooltip(
|
: Tooltip(
|
||||||
message: room.topic,
|
message: room.topic,
|
||||||
child: Text(
|
child: Text(
|
||||||
room.topic.replaceAll('\n', ' '),
|
room.topic.replaceAll('\n', ' '),
|
||||||
softWrap: false,
|
softWrap: false,
|
||||||
overflow: TextOverflow.fade,
|
overflow: TextOverflow.fade,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
onTap: () => controller.setActiveSpacesEntry(
|
||||||
onTap: () => controller.setActiveSpacesEntry(
|
context,
|
||||||
context,
|
space,
|
||||||
space,
|
),
|
||||||
),
|
trailing: IconButton(
|
||||||
trailing: IconButton(
|
icon: const Icon(Icons.edit),
|
||||||
icon: const Icon(Icons.edit),
|
tooltip: L10n.of(context)!.edit,
|
||||||
tooltip: L10n.of(context)!.edit,
|
onPressed: () => controller.editSpace(context, room.id),
|
||||||
onPressed: () => controller.editSpace(context, room.id),
|
),
|
||||||
),
|
);
|
||||||
);
|
}
|
||||||
}
|
},
|
||||||
},
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user