chore: Improved UX for creating groups and spaces

This commit is contained in:
krille-chan 2024-11-01 08:14:47 +01:00
commit b9cd24eea7
No known key found for this signature in database
8 changed files with 151 additions and 259 deletions

View file

@ -98,10 +98,6 @@ class ChatListController extends State<ChatList>
StreamSubscription? _intentUriStreamSubscription;
void createNewSpace() {
context.push<String?>('/rooms/newspace');
}
ActiveFilter activeFilter = AppConfig.separateChatTypes
? ActiveFilter.messages
: ActiveFilter.allChats;

View file

@ -157,7 +157,12 @@ class ChatListItem extends StatelessWidget {
right: 0,
child: Avatar(
border: space == null
? null
? room.isSpace
? BorderSide(
width: 1,
color: theme.dividerColor,
)
: null
: BorderSide(
width: 2,
color: backgroundColor ??
@ -251,11 +256,6 @@ class ChatListItem extends StatelessWidget {
),
),
),
if (room.isSpace)
const Icon(
Icons.arrow_circle_right_outlined,
size: 18,
),
],
),
subtitle: Row(

View file

@ -38,16 +38,6 @@ class ClientChooserButton extends StatelessWidget {
],
),
),
PopupMenuItem(
value: SettingsAction.newSpace,
child: Row(
children: [
const Icon(Icons.workspaces_outlined),
const SizedBox(width: 18),
Text(L10n.of(context).createNewSpace),
],
),
),
PopupMenuItem(
value: SettingsAction.setStatus,
child: Row(
@ -260,9 +250,6 @@ class ClientChooserButton extends StatelessWidget {
case SettingsAction.newGroup:
context.go('/rooms/newgroup');
break;
case SettingsAction.newSpace:
controller.createNewSpace();
break;
case SettingsAction.invite:
FluffyShare.shareInviteLink(context);
break;
@ -352,7 +339,6 @@ class ClientChooserButton extends StatelessWidget {
enum SettingsAction {
addAccount,
newGroup,
newSpace,
setStatus,
invite,
settings,