Comments (1)
Hi Jordan,
Thanks for raising this.
At first I thought this didn't happen because I have tested it in the sample app and also because I even wrote unit tests for this (I was wrong in the second part - maybe I write similar tests for the state but not effects).
The library works fine with regards to surviving a configuration change. In other words, if you start some long lasting operation while the phone is in portrait, then the user changes to landscape, and eventually the operation emits an effect, provided you handle configuration changes properly, you will get this effect. You can play with this in the sample app of this library.
But based on your description/by reading the article you linked, there is one case where this is problematic which is if the effect is emitted while there are no subscribers. It doesn't seem to work in this situation (the effect is dropped). I quickly changed the code to use a BroadcastChannel
(the original way this was implemented in the library) and also a Channel
as you described but the problem is still there.
I wrote a unit test that exhibits the problem. But it fails in all 3 modes I have tried. Sadly I don't have enough time to look at this (my priority is to move away from jcenter/bintray and manage my fulltime job).
If you are keen to help or just investigate, you can have a go at making this unit test pass: https://github.com/pedroql/mvflow/tree/fix_effects_dropped
Thanks
from mvflow.
Related Issues (11)
- Is it possible to add time travel debugger? HOT 4
- Unit Test samples HOT 1
- Handler State Become Stale for Actions That Produce Long Running Flows HOT 1
- Ability to allow same Flow emission HOT 4
- is it possible to use MVFlow in Jetpack Compose? HOT 1
- Best practices to send a throwable from Fragment/Activity? HOT 2
- Is it possible to combine reducer & handler? HOT 1
- Migrate from jcenter HOT 1
- How to stop an async task launched by the handler HOT 2
- Android sample app wont even sync on latest Android Studio Iguana HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mvflow.