From f4d58bd7a759e571b6be5fead9d8ef412f6af194 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 1 Oct 2019 09:49:07 -0500 Subject: [PATCH] Animate the timeline unread count indicator --- iOS/MasterTimeline/MasterTimelineViewController.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iOS/MasterTimeline/MasterTimelineViewController.swift b/iOS/MasterTimeline/MasterTimelineViewController.swift index 84eda2f49..ccc773a17 100644 --- a/iOS/MasterTimeline/MasterTimelineViewController.swift +++ b/iOS/MasterTimeline/MasterTimelineViewController.swift @@ -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() + } } }