Skip to content

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