Skip to content

Minor changes #2

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

Conversation

maskaravivek
Copy link

No description provided.

@@ -131,7 +124,7 @@ private void init() {
title = new Title();
initRecyclerView();
initPresenter();
RxTextView.textChanges(etTitle)
Disposable disposable = RxTextView.textChanges(etTitle)
.subscribe(text -> {
if (!TextUtils.isEmpty(text)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Treat a subscribed RxView.clicks() (or any Observable from this library for that matter) like you would the View reference itself. If you pass it (or subscribe to it) somewhere outside the lifetime of the View, you've just leaked your entire activity.

So if you're just subscribing inside your ViewHolder there's no need to unsubscribe just like there'd be no need to unregister a click listener were you doing it manually.

@ashishkumar468 ashishkumar468 merged commit 59bac5b into ashishkumar468:feature/refractor_uploads May 10, 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

Successfully merging this pull request may close these issues.

2 participants