add reply action

This commit is contained in:
Salvatore Giordano
2020-02-27 18:37:51 +01:00
parent 541cafb49f
commit 15c13a7dc9
6 changed files with 144 additions and 76 deletions
+6 -1
View File
@@ -69,10 +69,15 @@ class StreamChannelState extends State<StreamChannel> {
Future<void> getReplies(String parentId) async {
_queryMessageController.add(true);
print('PARENT $parentId');
String firstId;
if (widget.channel.state.threads.containsKey(parentId)) {
firstId = widget.channel.state.threads[parentId].first.id;
final thread = widget.channel.state.threads[parentId];
if (thread != null && thread.isNotEmpty) {
firstId = thread?.first?.id;
}
}
return widget.channel