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

Add Managing Lifecycle State #22

Closed
jraska opened this issue Nov 20, 2018 · 1 comment
Closed

Add Managing Lifecycle State #22

jraska opened this issue Nov 20, 2018 · 1 comment

Comments

@jraska
Copy link
Owner

jraska commented Nov 20, 2018

Currently the library uses LiveData.observeForever(Observer) method and does not allow the clients to change the state of LiveData. This would be possible by using observe(Lifecycle, Observer)and adding lifecycle management to Observer API.

At the moment I'm not sure if adding this kind of management is worth the cost of increasing library scope, but I'm opening this based on Medium comment to try it and possibly gather more feedback.

Please comment with possible use cases or just thumbs up.

@jraska
Copy link
Owner Author

jraska commented Nov 20, 2018

Option here: 24f7f4d

Problem is that doing this adds more methods, which are useless in case TestObserver instance is created on its own. We may restrict this, but it may piss off some users, who use the observer separately.

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

1 participant