Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to force refresh ui in an inactive activity ? #252

Closed
lwj1994 opened this issue Jul 18, 2019 · 1 comment
Closed

How to force refresh ui in an inactive activity ? #252

lwj1994 opened this issue Jul 18, 2019 · 1 comment

Comments

@lwj1994
Copy link

lwj1994 commented Jul 18, 2019

I built a video list using mvrx. I came across a scene where I paused the video on onpause() . But when I press the home button, mvrx will not refresh ui, the video is still playing. I guess, when I press the home button, the Activity has entered the background, not active, so mvrx does not respond.

@tasomaniac
Copy link
Contributor

Currently, there is no way to get notified about state changes in the UI (Fragment or Activity) when the screen is not active. Doing this is kind of against what MvRx is trying to do.

Imagine your MvRx state as a representation of what your users see when they are actively have the screen visible. Using clicking the pause button would pause the video by changing the state. But lifecycle can be seen as different since you want to resume when the screen comes back.

@lwj1994 lwj1994 closed this as completed Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants