feat: Fixed conflicts, added group info screen

This commit is contained in:
Deven Joshi
2021-01-01 14:04:33 +05:30
parent 3006725ad7
commit dc643c0f71
3 changed files with 37 additions and 26 deletions
+28
View File
@@ -398,6 +398,34 @@ class _ChannelListPageState extends State<ChannelListPage> {
limit: 20,
),
channelWidget: ChannelPage(),
onViewInfoTap: (channel) {
if (channel.memberCount == 2 &&
channel.isDistinct) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => StreamChannel(
channel: channel,
child: ChatInfoScreen(
user: channel.state.members.first.user,
),
),
),
);
} else {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => StreamChannel(
channel: channel,
child: GroupInfoScreen(),
),
),
);
}
// TODO: Add group screen
},
),
),
),