Fixed bug where unread indicator took precedence over star.

This commit is contained in:
Brent Simmons committed 2026-02-25 19:58:25 -08:00
1 parent b49adcd5c5
commit 50bd976b33
1 file changed
+10 -10
@@ -118,16 +118,7 @@ class MainTimelineCollectionViewCell: UICollectionViewCell {
}
private func updateIndicatorView(_ state: UICellConfigurationState) {
if cellData.read == false {
if indicatorView.alpha == 0.0 {
indicatorView.alpha = 1.0
}
UIView.animate(withDuration: Self.indicatorAnimationDuration) {
self.indicatorView.iconImage = Assets.Images.unreadCellIndicator
self.indicatorView.tintColor = (state.isSelected && !state.isSwiped) ? .white : Assets.Colors.secondaryAccent
}
return
} else if cellData.starred {
if cellData.starred {
if indicatorView.alpha == 0.0 {
indicatorView.alpha = 1.0
}
@@ -136,6 +127,15 @@ class MainTimelineCollectionViewCell: UICollectionViewCell {
self.indicatorView.tintColor = (state.isSelected && !state.isSwiped) ? .white : Assets.Colors.star
}
return
} else if cellData.read == false {
if indicatorView.alpha == 0.0 {
indicatorView.alpha = 1.0
}
UIView.animate(withDuration: Self.indicatorAnimationDuration) {
self.indicatorView.iconImage = Assets.Images.unreadCellIndicator
self.indicatorView.tintColor = (state.isSelected && !state.isSwiped) ? .white : Assets.Colors.secondaryAccent
}
return
} else if indicatorView.alpha == 1.0 {
UIView.animate(withDuration: Self.indicatorAnimationDuration) {
self.indicatorView.alpha = 0.0