Fade out unread and star indicators when possible. Issue #1683

This commit is contained in:
Maurice Parker 2020-01-21 11:41:03 -07:00
parent 1f58161eeb
commit 050434023e

View File

@ -178,13 +178,26 @@ private extension MasterTimelineTableViewCell {
} }
func updateUnreadIndicator() { func updateUnreadIndicator() {
if !unreadIndicatorView.isHidden && cellData.read && !cellData.starred {
UIView.animate(withDuration: 0.66, animations: { self.unreadIndicatorView.alpha = 0 }) { _ in
self.unreadIndicatorView.isHidden = true
self.unreadIndicatorView.alpha = 1
}
} else {
showOrHideView(unreadIndicatorView, cellData.read || cellData.starred) showOrHideView(unreadIndicatorView, cellData.read || cellData.starred)
unreadIndicatorView.setNeedsDisplay() }
} }
func updateStarView() { func updateStarView() {
if !starView.isHidden && cellData.read && !cellData.starred {
UIView.animate(withDuration: 0.66, animations: { self.starView.alpha = 0 }) { _ in
self.starView.isHidden = true
self.starView.alpha = 1
}
} else {
showOrHideView(starView, !cellData.starred) showOrHideView(starView, !cellData.starred)
} }
}
func updateIconImage() { func updateIconImage() {
guard let image = cellData.iconImage, cellData.showIcon else { guard let image = cellData.iconImage, cellData.showIcon else {