🐛 Bug fixes of scaffold

This commit is contained in:
2024-05-03 14:04:34 +08:00
parent d179d907ad
commit e742338d92
6 changed files with 26 additions and 21 deletions

View File

@ -32,7 +32,6 @@ class ChatScreen extends StatelessWidget {
title: chat.focusChannel?.name ?? 'Loading...',
hideDrawer: true,
fixedAppBarColor: SolianTheme.isLargeScreen(context),
appBarLeading: IconButton(icon: const Icon(Icons.tag), onPressed: () {}),
appBarActions: chat.focusChannel != null
? [
ChannelCallAction(

View File

@ -25,10 +25,17 @@ class ChatListScreen extends StatelessWidget {
fixedAppBarColor: SolianTheme.isLargeScreen(context),
child: ChatListWidget(
onSelect: (item) {
SolianRouter.router.pushReplacementNamed(
'chat.channel',
pathParameters: {'channel': item.alias},
);
if (SolianRouter.currentRoute.name == 'chat.channel') {
SolianRouter.router.pushReplacementNamed(
'chat.channel',
pathParameters: {'channel': item.alias},
);
} else {
SolianRouter.router.pushNamed(
'chat.channel',
pathParameters: {'channel': item.alias},
);
}
},
),
);