brianegan / flutter_architecture_samples

TodoMVC for Flutter
http://fluttersamples.com/
BSD 3-Clause "New" or "Revised" License
8.75k stars 1.71k forks source link

Firestore listener will get dropped after long period of inactivity or app in background #192

Open elvisun opened 4 years ago

elvisun commented 4 years ago

I followed a similar design with the ConnectToDataSourceAction action which triggers a listener on login.

https://github.com/brianegan/flutter_architecture_samples/blob/master/firestore_redux/lib/middleware/store_todos_middleware.dart

However I noticed sometimes (haven't been able to reproduce this consistently), after long period of inactivity or app in background, this listener would get cancelled by Firestore. I think we'd need some way to re-subscribe. Have you encountered anything like this?