use normal notifications

This commit is contained in:
Salvatore Giordano
2020-03-20 15:38:23 +01:00
parent af16d90789
commit 64a40d60da
6 changed files with 162 additions and 9 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ class _ChannelListViewState extends State<ChannelListView> {
child: StreamBuilder<List<Channel>>(
stream: streamChat.channelsStream,
builder: (context, snapshot) {
if (false && snapshot.hasError) {
if (snapshot.hasError) {
if (snapshot.error is Error) {
print((snapshot.error as Error).stackTrace);
}
+1 -1
View File
@@ -261,7 +261,7 @@ class _MessageWidgetState extends State<MessageWidget>
row = row.reversed.toList();
}
return widget.message.replyCount > 0
return (widget.message.replyCount ?? 0) > 0
? GestureDetector(
onTap: () {
if (widget.isParent) {
+3 -2
View File
@@ -223,11 +223,12 @@ class StreamChatState extends State<StreamChat> with WidgetsBindingObserver {
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
print('NEW STATE $state');
if (state == AppLifecycleState.paused) {
client.disconnect();
} else if (state == AppLifecycleState.resumed) {
client.connect();
if (client.wsConnectionStatus.value == ConnectionStatus.disconnected) {
client.connect();
}
}
}