quicker reaction dismiss animation

This commit is contained in:
Ryan Nystrom
2017-10-03 21:48:36 +02:00
parent ce14d5118b
commit 2df96426dc
2 changed files with 5 additions and 6 deletions

View File

@@ -226,10 +226,9 @@ UICollectionViewDelegateFlowLayout {
}
case .remove:
if let data = data(for: queued.content) {
data.cell.pullOut(completion: { _ in
self.reactions = viewModel.models
self.collectionView.deleteItems(at: [data.path])
})
data.cell.pullOut()
self.reactions = viewModel.models
self.collectionView.deleteItems(at: [data.path])
}
case .none: break
}

View File

@@ -89,7 +89,7 @@ final class IssueReactionCell: UICollectionViewCell {
})
}
func pullOut(completion: @escaping (Bool) -> ()) {
func pullOut() {
// hack to prevent changing to "0"
countLabel.text = "1"
@@ -100,7 +100,7 @@ final class IssueReactionCell: UICollectionViewCell {
self.countLabel.alpha = 0
self.emojiLabel.transform = CGAffineTransform(scaleX: 0.3, y: 0.3)
self.emojiLabel.alpha = 0
}, completion: completion)
})
}
func iterate(add: Bool) {