Skip to content

Commit

Permalink
updated Demo App to cope with API changes from #11
Browse files Browse the repository at this point in the history
  • Loading branch information
sobri909 committed May 7, 2018
1 parent 84a5844 commit 5676add
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions LocoKit Demo App/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,12 @@ class ViewController: UIViewController {
if let currentItem = self.recorder.currentItem {
log(".newTimelineItem (\(String(describing: type(of: currentItem))))")
}
onMain {
let items = self.itemsToShow
self.mapView.update(with: items)
self.timelineView.update(with: items)
}
}

// observe timeline item updates
when(.updatedTimelineItem) { _ in
onMain {
let items = self.itemsToShow
self.mapView.update(with: items)
self.timelineView.update(with: items)
}
}

when(.mergedTimelineItems) { note in
if let description = note.userInfo?["merge"] as? String {
if let description = note.userInfo?["description"] as? String {
log(".mergedItems (\(description))")
}
onMain { self.timelineView.update(with: self.itemsToShow) }
}

let loco = LocomotionManager.highlander
Expand Down

0 comments on commit 5676add

Please sign in to comment.