Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val suggestions: Observable[Try[List[String]]] = searchTerms.flatMap(term => wikiSuggestResponseStream(term).recovered)
- val suggestionSubscription: Subscription = suggestions.observeOn(eventScheduler) subscribe {
- x => suggestionList.listData = x.get
- }
- val selections: Observable[String] = button.clicks.map(_ => suggestionList.selection.items).filter(!_.isEmpty).map(_.head)
- val pages: Observable[Try[String]] = selections.flatMap(selection => wikiPageResponseStream(selection).recovered)
- val pageSubscription: Subscription = pages.observeOn(eventScheduler) subscribe {
- x => editorpane.text = x.get
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement