From fb10824b14f7b7fcd13960fa3e564392e93dc985 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 15 Jul 2021 12:07:48 +0200 Subject: [PATCH] use inactive as a foreground state --- .../stream_chat_flutter_core/lib/src/stream_chat_core.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart b/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart index e80472cd..6e39d5e3 100644 --- a/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart +++ b/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart @@ -159,7 +159,10 @@ class StreamChatCoreState extends State @override void didChangeAppLifecycleState(AppLifecycleState state) { - _isInForeground = state == AppLifecycleState.resumed; + _isInForeground = [ + AppLifecycleState.resumed, + AppLifecycleState.inactive, + ].contains(state); if (user != null) { if (_isInForeground) { _onForeground();