Skip to content

Commit

Permalink
Always observe nearby stations on the UI thread.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottwilliams committed Jun 5, 2017
1 parent ccd4f05 commit 3ce70fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Proper/Controllers/POITableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ class POITableViewController: UITableViewController, ProperViewController {

// From the list of stations coming from the view model, produce topic event subscriptions for each station.
// Reload a station's section when a topic event is received for it.
disposable += (POIViewModel.chain(connection: connection, producer: stations.producer) |> modifyTable)
let opsProducer = POIViewModel.chain(connection: connection, producer: stations.producer)
disposable += modifyTable(producer: opsProducer)
.logEvents(identifier: "POITableViewController.viewDidAppear", logger: logSignalEvent)
.startWithFailed(self.displayError)
}
Expand Down
1 change: 1 addition & 0 deletions Proper/Controllers/POIViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ class POIViewController: UIViewController, ProperViewController, UISearchControl

// Search for nearby stations.
disposable += NearbyStationsViewModel.chain(connection: connection, producer: searchProducer)
.observe(on: UIScheduler())
.startWithResult() { result in
switch result {
case let .success(stations): self.stations.swap(stations)
Expand Down

0 comments on commit 3ce70fe

Please sign in to comment.