chore: make space nav bar narrower on mobile and ensure space nav bar matches user's theme

pull/1907/head
ggurdin 5 months ago
parent 87c2639625
commit fef96359c9
No known key found for this signature in database
GPG Key ID: A01CB41737CBB478

@ -44,7 +44,11 @@ class NaviRailItem extends StatelessWidget {
bottom: 8, bottom: 8,
left: 0, left: 0,
child: AnimatedContainer( child: AnimatedContainer(
width: isSelected ? 8 : 0, width: isSelected
? FluffyThemes.isColumnMode(context)
? 8
: 4
: 0,
duration: FluffyThemes.animationDuration, duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve, curve: FluffyThemes.animationCurve,
decoration: BoxDecoration( decoration: BoxDecoration(

@ -34,8 +34,7 @@ class SettingsView extends StatelessWidget {
?.tryGet<String>('account'); ?.tryGet<String>('account');
return Row( return Row(
children: [ children: [
if (FluffyThemes.isColumnMode(context) || if (FluffyThemes.isColumnMode(context)) ...[
AppConfig.displayNavigationRail) ...[
SpacesNavigationRail( SpacesNavigationRail(
activeSpaceId: null, activeSpaceId: null,
onGoToChats: () => context.go('/rooms'), onGoToChats: () => context.go('/rooms'),

@ -33,7 +33,9 @@ class SpacesNavigationRail extends StatelessWidget {
.uri .uri
.path .path
.startsWith('/rooms/settings'); .startsWith('/rooms/settings');
return StreamBuilder( return Material(
child: SafeArea(
child: StreamBuilder(
key: ValueKey( key: ValueKey(
client.userID.toString(), client.userID.toString(),
), ),
@ -52,7 +54,9 @@ class SpacesNavigationRail extends StatelessWidget {
.toList(); .toList();
return SizedBox( return SizedBox(
width: FluffyThemes.navRailWidth, width: FluffyThemes.isColumnMode(context)
? FluffyThemes.navRailWidth
: FluffyThemes.navRailWidth * 0.75,
child: Column( child: Column(
children: [ children: [
Expanded( Expanded(
@ -89,7 +93,8 @@ class SpacesNavigationRail extends StatelessWidget {
); );
} }
final space = rootSpaces[i]; final space = rootSpaces[i];
final displayname = rootSpaces[i].getLocalizedDisplayname( final displayname =
rootSpaces[i].getLocalizedDisplayname(
MatrixLocals(L10n.of(context)), MatrixLocals(L10n.of(context)),
); );
final spaceChildrenIds = final spaceChildrenIds =
@ -132,6 +137,8 @@ class SpacesNavigationRail extends StatelessWidget {
), ),
); );
}, },
),
),
); );
} }
} }

Loading…
Cancel
Save