Skip to content

Commit

Permalink
Removes unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwiz committed Jun 24, 2015
1 parent c48be75 commit df500d3
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,16 @@ protected void onCreate(Bundle savedInstanceState) {
/**
* Creates an {@link Observable} that will be emitted only once
*/
Observable<String> singleObservable = Observable.just("Hello, World!");

singleObservable.observeOn(AndroidSchedulers.mainThread())
Observable.just("Hello, World!")
.observeOn(AndroidSchedulers.mainThread())
.map(String::toUpperCase)
.subscribe(txtPart1::setText);

/**
* Emits one item at the time, taking them from any {@link java.util.Collection}
*/
Observable<String> oneByOneObservable = Observable.from(manyWords);
oneByOneObservable.observeOn(AndroidSchedulers.mainThread())
Observable.from(manyWords)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(message -> Toast.makeText(context, message, Toast.LENGTH_SHORT).show());

Observable.just(manyWordList)
Expand Down

0 comments on commit df500d3

Please sign in to comment.