use inactive as a foreground state

This commit is contained in:
Salvatore Giordano
2021-07-15 12:07:48 +02:00
parent 6399e8f2db
commit fb10824b14
@@ -159,7 +159,10 @@ class StreamChatCoreState extends State<StreamChatCore>
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
_isInForeground = state == AppLifecycleState.resumed;
_isInForeground = [
AppLifecycleState.resumed,
AppLifecycleState.inactive,
].contains(state);
if (user != null) {
if (_isInForeground) {
_onForeground();