mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-06 20:19:30 +01:00
feat: Nicer spaces list
This commit is contained in:
parent
d487ddc05b
commit
2297195ba7
@ -18,6 +18,11 @@
|
|||||||
"uri": {}
|
"uri": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"allChats": "All chats",
|
||||||
|
"@allChats": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders": {}
|
||||||
|
},
|
||||||
"chats": "Chats",
|
"chats": "Chats",
|
||||||
"@chats": {
|
"@chats": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
@ -199,23 +199,33 @@ class ChatListView extends StatelessWidget {
|
|||||||
itemBuilder: (context, i) {
|
itemBuilder: (context, i) {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
selected: controller.activeSpaceId == null,
|
||||||
|
selectedTileColor:
|
||||||
|
Theme.of(context).secondaryHeaderColor,
|
||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
foregroundColor:
|
foregroundColor:
|
||||||
Theme.of(context).primaryColor,
|
|
||||||
backgroundColor:
|
|
||||||
Theme.of(context).secondaryHeaderColor,
|
Theme.of(context).secondaryHeaderColor,
|
||||||
|
backgroundColor:
|
||||||
|
Theme.of(context).primaryColor,
|
||||||
radius: Avatar.defaultSize / 2,
|
radius: Avatar.defaultSize / 2,
|
||||||
child: Icon(Icons.home_outlined),
|
child: Icon(Icons.home_outlined),
|
||||||
),
|
),
|
||||||
title: Text(L10n.of(context).chats),
|
title: Text(L10n.of(context).allChats),
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
controller.setActiveSpaceId(context, null),
|
controller.setActiveSpaceId(context, null),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
final space = controller.spaces[i - 1];
|
final space = controller.spaces[i - 1];
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
selected: controller.activeSpaceId == space.id,
|
||||||
|
selectedTileColor:
|
||||||
|
Theme.of(context).secondaryHeaderColor,
|
||||||
leading: Avatar(space.avatar, space.displayname),
|
leading: Avatar(space.avatar, space.displayname),
|
||||||
title: Text(space.displayname),
|
title: Text(space.displayname, maxLines: 1),
|
||||||
|
subtitle: Text(L10n.of(context).countParticipants(
|
||||||
|
(space.summary.mJoinedMemberCount +
|
||||||
|
space.summary.mInvitedMemberCount)
|
||||||
|
.toString())),
|
||||||
onTap: () => controller.setActiveSpaceId(
|
onTap: () => controller.setActiveSpaceId(
|
||||||
context, space.id),
|
context, space.id),
|
||||||
trailing: IconButton(
|
trailing: IconButton(
|
||||||
|
Loading…
Reference in New Issue
Block a user