Created
November 24, 2016 22:11
-
-
Save murki/a5aefedf992b260ce513c337f818b3bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// IDisplayedData implementation (e.g. a Fragment) | |
private Subscription dataSubscription; | |
public void refreshData() { | |
// Last parameter means delayError = true | |
Observable<Timestamped<Data>> dataObservable = domainService.getData(this).observeOn(AndroidSchedulers.mainThread(), true); | |
dataSubscription = dataObservable.subscribe(dataOnNext, dataOnError, dataOnComplete); | |
} | |
@Override | |
public long getTimestampMillis() { | |
// implement IDisplayedData method to obtain data's last timestamp | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment