From 59579138d0a6a57c1fb59b3372532ad024672933 Mon Sep 17 00:00:00 2001 From: David Sinclair Date: Wed, 21 Sep 2022 21:02:43 -0600 Subject: [PATCH] #1726 (saved story folder color) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - This would have been broken forever; the code hasn’t changed in years. - Now doesn’t show the count for collapsed folders for Saved intelligence view, since they don’t correspond with the saved view. --- clients/ios/Classes/FolderTitleView.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/clients/ios/Classes/FolderTitleView.m b/clients/ios/Classes/FolderTitleView.m index 76961e8b1..4b6c3f167 100644 --- a/clients/ios/Classes/FolderTitleView.m +++ b/clients/ios/Classes/FolderTitleView.m @@ -42,7 +42,8 @@ NSString *folderName = appDelegate.dictFoldersArray[section]; NSString *collapseKey = [NSString stringWithFormat:@"folderCollapsed:%@", folderName]; - bool isFolderCollapsed = [userPreferences boolForKey:collapseKey]; + BOOL isFolderCollapsed = [userPreferences boolForKey:collapseKey]; + BOOL isSavedStoriesFeed = self.appDelegate.isSavedStoriesIntelligenceMode; NSInteger countWidth = 0; NSString *accessibilityCount = @""; NSArray *folderComponents = [folderName componentsSeparatedByString:@" ▸ "]; @@ -77,7 +78,7 @@ [self addSubview:unreadCount]; accessibilityCount = [NSString stringWithFormat:@", %@ searches", @(count)]; - } else if (isFolderCollapsed) { + } else if (isFolderCollapsed && !isSavedStoriesFeed) { UnreadCounts *counts = [appDelegate splitUnreadCountForFolder:folderName]; unreadCount = [[UnreadCountView alloc] initWithFrame:CGRectMake(rect.origin.x, 0, CGRectGetWidth(rect), CGRectGetHeight(rect))]; unreadCount.appDelegate = appDelegate; @@ -287,7 +288,7 @@ [customView setAutoresizingMask:UIViewAutoresizingNone]; - if (isFolderCollapsed) { + if (isFolderCollapsed && !isSavedStoriesFeed) { [self insertSubview:customView belowSubview:unreadCount]; } else { [self addSubview:customView];