Skip to content

Commit

Permalink
Merge pull request artsy#2016 from artsy/ashfurrow-lot-list-perf
Browse files Browse the repository at this point in the history
Removes old subscriptions to improve lot list scrolling performance
  • Loading branch information
alloy authored Nov 17, 2016
2 parents 50bede8 + 6da7e3a commit 6f05115
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class LiveAuctionLotListViewController: UICollectionViewController {
return sSelf.stickyCollectionViewLayout.setActiveIndex(nil)
}

sSelf.unsubscribeCurrentLotState()

// A lot can be the _current_ lot without being _opened_ yet. We check the current lot state to make sure that the activeIndex of the layout corresponds to the lotState that the cells are using to render themselves.
sSelf.currentLotStateSubscription = lot.lotStateSignal.subscribe { lotState in
let activeIndex: Int? = (lotState == .LiveLot ? sSelf.salesPerson.indexForViewModel(lot) : nil)
Expand All @@ -58,7 +60,6 @@ class LiveAuctionLotListViewController: UICollectionViewController {
}

deinit {
currentLotStateSubscription?.unsubscribe()
unsubscribeCurrentLotState()
}

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ upcoming:
- Fixes tableview crasher in onboarding - sarah + maxim
- Fixes email retrieval from Facebook SDK and removes email confirmation screen - maxim
- Fixes crasher in onboarding tableview when no selection was made - alloy
- Fixes performance issues on the live auctions lot list - ash

- Fixes bug in GeneVC where fetching was starting on page 2 - sarah
- Update home view artworks rails order - maxim
- Fix artist link to auction results - alloy
Expand Down

0 comments on commit 6f05115

Please sign in to comment.