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

Adding javadoc to explain that items will be continually be emitted u… #2201

Merged
merged 1 commit into from
Feb 1, 2016

Conversation

donnfelker
Copy link
Contributor

…nless other wise instructed with the first() operator.

Closes #2135

* when subscribed to. Items will continually be emitted as the Realm is updated -
* {@code onComplete} will never be called.
*
* If you would like the {@code asObservable()} to stop emitting items you can instruct Rx to
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it RxJava or just Rx ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should make it RxJava. Will fix.

@cmelchior
Copy link
Contributor

I like it, and great with the example as well. We need to update the other asObservable methods as well though: RealmResults, RealmObject

@donnfelker
Copy link
Contributor Author

Ahh, will do. I'll update the other classes.

@donnfelker
Copy link
Contributor Author

@cmelchior Updated the RealmObject and RealmResults. Let me know about the code formatting <pre> and {@code} preference and I'll update it.

@cmelchior
Copy link
Contributor

Looks like I was wrong, It seems that using both <pre> and {@code is correct: http://stackoverflow.com/questions/541920/multiple-line-code-example-in-javadoc-comment.

*
* <pre>
* {@code
* realm.where(Foo.class).findAllAsync().asObservable()
Copy link
Contributor

Choose a reason for hiding this comment

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

I would adjust the example to fit the context. In this one, we are observing on a Realm:

realm.asObservable().first()

@donnfelker
Copy link
Contributor Author

@cmelchior All requested changes have been made. :)

@cmelchior
Copy link
Contributor

Looks good to me. 👍 once squashed.
@realm/java

@beeender
Copy link
Contributor

beeender commented Feb 1, 2016

👍

…nless other wise instructed with the first() operator. Closes realm#2135

Changing Rx -> RxJava for clarity.

Adding asObservable comments to RealmObject and RealmResults.

Fixing BaseRealm example as we are observing the Realm, not the results.

Fixing lambda example.

Using Async example for RealmResults.
@donnfelker
Copy link
Contributor Author

@cmelchior Squashed.

@cmelchior
Copy link
Contributor

Hmm, looks like a regression on our part somewhere: io.realm.RealmSchemaTests.remove_classWithReferencesThrows (from io.realm.DynamicRealmObjectTests)

@donnfelker
Copy link
Contributor Author

Do you need me to do anything to help push this along?

@cmelchior
Copy link
Contributor

No, this PR shouldn't cause any build failure. I'll look into it.

cmelchior added a commit that referenced this pull request Feb 1, 2016
Adding javadoc to explain that items will be continually be emitted u…
@cmelchior cmelchior merged commit b2dd820 into realm:master Feb 1, 2016
@cmelchior cmelchior removed the Review label Feb 1, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants