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 @override
void didChangeAppLifecycleState(AppLifecycleState state) { void didChangeAppLifecycleState(AppLifecycleState state) {
_isInForeground = state == AppLifecycleState.resumed; _isInForeground = [
AppLifecycleState.resumed,
AppLifecycleState.inactive,
].contains(state);
if (user != null) { if (user != null) {
if (_isInForeground) { if (_isInForeground) {
_onForeground(); _onForeground();