Leave & delete channel

This commit is contained in:
2024-04-26 23:25:56 +08:00
parent a02831644c
commit a761b80499
8 changed files with 222 additions and 65 deletions

View File

@@ -13,12 +13,18 @@ class ChannelAction extends StatelessWidget {
@override
Widget build(BuildContext context) {
return IconButton(
onPressed: () {
router.pushNamed(
onPressed: () async {
final result = await router.pushNamed(
'chat.channel.manage',
extra: channel,
pathParameters: {'channel': channel.alias},
);
switch(result) {
case 'disposed':
if(router.canPop()) router.pop('refresh');
case 'refresh':
onUpdate();
}
},
focusNode: _focusNode,
style: TextButton.styleFrom(shape: const CircleBorder()),