mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 17:29:23 +00:00
Restore Self.indicatorAnimationDuration
This commit is contained in:
2 files changed
+10
-6
No files matched your search
@@ -25,6 +25,8 @@ class MainTimelineCollectionViewCell: UICollectionViewCell {
|
||||
|
||||
var isPreview: Bool = false
|
||||
|
||||
private static let indicatorAnimationDuration = 0.25
|
||||
|
||||
override func awakeFromNib() {
|
||||
MainActor.assumeIsolated {
|
||||
super.awakeFromNib()
|
||||
@@ -62,7 +64,7 @@ class MainTimelineCollectionViewCell: UICollectionViewCell {
|
||||
if indicatorView.alpha == 0.0 {
|
||||
indicatorView.alpha = 1.0
|
||||
}
|
||||
UIView.animate(withDuration: 0.25) {
|
||||
UIView.animate(withDuration: Self.indicatorAnimationDuration) {
|
||||
self.indicatorView.iconImage = Assets.Images.unreadCellIndicator
|
||||
self.indicatorView.tintColor = (state.isSelected && !state.isSwiped) ? .white : Assets.Colors.secondaryAccent
|
||||
}
|
||||
@@ -72,14 +74,14 @@ class MainTimelineCollectionViewCell: UICollectionViewCell {
|
||||
if indicatorView.alpha == 0.0 {
|
||||
indicatorView.alpha = 1.0
|
||||
}
|
||||
UIView.animate(withDuration: 0.25) {
|
||||
UIView.animate(withDuration: Self.indicatorAnimationDuration) {
|
||||
self.indicatorView.iconImage = Assets.Images.starredFeed
|
||||
self.indicatorView.tintColor = (state.isSelected && !state.isSwiped) ? .white : Assets.Colors.star
|
||||
}
|
||||
return
|
||||
}
|
||||
else if indicatorView.alpha == 1.0 {
|
||||
UIView.animate(withDuration: 0.25) {
|
||||
UIView.animate(withDuration: Self.indicatorAnimationDuration) {
|
||||
self.indicatorView.alpha = 0.0
|
||||
self.indicatorView.iconImage = nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user