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,12 +178,25 @@ private extension MasterTimelineTableViewCell {
} }
func updateUnreadIndicator() { func updateUnreadIndicator() {
showOrHideView(unreadIndicatorView, cellData.read || cellData.starred) if !unreadIndicatorView.isHidden && cellData.read && !cellData.starred {
unreadIndicatorView.setNeedsDisplay() 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)
}
} }
func updateStarView() { func updateStarView() {
showOrHideView(starView, !cellData.starred) 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)
}
} }
func updateIconImage() { func updateIconImage() {