From 6b2de1855762c4180a2d5c5d3cb1c01256507bfa Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 1 Nov 2019 17:48:27 -0500 Subject: [PATCH] Add fade in fade out animation for Account unread counts. Issue #1228 --- .../Cell/MasterFeedTableViewSectionHeader.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift index 72fcf18be..79928344e 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift +++ b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift @@ -156,9 +156,13 @@ private extension MasterFeedTableViewSectionHeader { func updateUnreadCountView() { if !disclosureExpanded && unreadCount > 0 { - unreadCountView.isHidden = false + UIView.animate(withDuration: 0.3) { + self.unreadCountView.alpha = 1 + } } else { - self.unreadCountView.isHidden = true + UIView.animate(withDuration: 0.3) { + self.unreadCountView.alpha = 0 + } } }