minor fix

pull/638/head
Ryan Zhao 3 years ago
parent eb125baca3
commit a572c4274b

@ -228,7 +228,7 @@ extension ReactionListSheet: UICollectionViewDataSource, UICollectionViewDelegat
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Cell.identifier, for: indexPath) as! Cell
let item = reactionMap.orderedItems[indexPath.item]
cell.data = (item.0, item.1.count)
cell.isSelected = item.0 == selectedReaction!
cell.isCurrentSelection = item.0 == selectedReaction!
return cell
}
@ -278,7 +278,7 @@ extension ReactionListSheet {
fileprivate final class Cell : UICollectionViewCell {
var data: (String, Int)? { didSet { update() } }
override var isSelected: Bool { didSet { updateBorder() } }
var isCurrentSelection: Bool? { didSet { updateBorder() } }
static let identifier = "ReactionListSheetCell"
@ -337,7 +337,7 @@ extension ReactionListSheet {
}
private func updateBorder() {
if isSelected {
if isCurrentSelection == true {
snContentView.addBorder(with: Colors.accent)
} else {
snContentView.addBorder(with: .clear)

Loading…
Cancel
Save