chore: Improve spaces design
This commit is contained in:
parent
a51cc082bc
commit
f143a60b61
2 changed files with 5 additions and 15 deletions
|
|
@ -35,6 +35,7 @@ class ChatListViewBody extends StatelessWidget {
|
||||||
final activeSpace = controller.activeSpaceId;
|
final activeSpace = controller.activeSpaceId;
|
||||||
if (activeSpace != null) {
|
if (activeSpace != null) {
|
||||||
return SpaceView(
|
return SpaceView(
|
||||||
|
key: ValueKey(activeSpace),
|
||||||
spaceId: activeSpace,
|
spaceId: activeSpace,
|
||||||
onBack: controller.clearActiveSpace,
|
onBack: controller.clearActiveSpace,
|
||||||
onChatTab: (room) => controller.onChatTap(room),
|
onChatTab: (room) => controller.onChatTap(room),
|
||||||
|
|
|
||||||
|
|
@ -324,8 +324,8 @@ class _SpaceViewState extends State<SpaceView> {
|
||||||
true
|
true
|
||||||
? FloatingActionButton.extended(
|
? FloatingActionButton.extended(
|
||||||
onPressed: _addChatOrSubspace,
|
onPressed: _addChatOrSubspace,
|
||||||
label: Text(L10n.of(context).chat),
|
label: Text(L10n.of(context).group),
|
||||||
icon: const Icon(Icons.chat_outlined),
|
icon: const Icon(Icons.group_add_outlined),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
body: room == null
|
body: room == null
|
||||||
|
|
@ -436,20 +436,8 @@ class _SpaceViewState extends State<SpaceView> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SliverList.builder(
|
SliverList.builder(
|
||||||
itemCount: joinedRooms.length + 1,
|
itemCount: joinedRooms.length,
|
||||||
itemBuilder: (context, i) {
|
itemBuilder: (context, i) {
|
||||||
if (i == 0) {
|
|
||||||
return Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
SearchTitle(
|
|
||||||
title: L10n.of(context).joinedChats,
|
|
||||||
icon: const Icon(Icons.chat_outlined),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
i--;
|
|
||||||
final joinedRoom = joinedRooms[i];
|
final joinedRoom = joinedRooms[i];
|
||||||
return ChatListItem(
|
return ChatListItem(
|
||||||
joinedRoom,
|
joinedRoom,
|
||||||
|
|
@ -569,6 +557,7 @@ class _SpaceViewState extends State<SpaceView> {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
const SliverPadding(padding: EdgeInsets.only(top: 32)),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue