mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-05-20 04:01:11 +08:00
quicker reaction dismiss animation
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user