Animate the timeline unread count indicator

This commit is contained in:
Maurice Parker 2019-10-01 09:49:07 -05:00
parent 66d9e882ad
commit f4d58bd7a7
1 changed files with 5 additions and 1 deletions

View File

@ -508,7 +508,11 @@ private extension MasterTimelineViewController {
func updateTitleUnreadCount() {
if let unreadCountProvider = coordinator.timelineFetcher as? UnreadCountProvider {
titleView?.unreadCountView.unreadCount = unreadCountProvider.unreadCount
UIView.animate(withDuration: 0.3) {
self.titleView?.unreadCountView.unreadCount = unreadCountProvider.unreadCount
self.titleView?.setNeedsLayout()
self.titleView?.layoutIfNeeded()
}
}
}