From b8f69779ed98909beb882a85b74830fdfaf3aa20 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 5 Oct 2017 13:09:09 -0700 Subject: [PATCH] =?UTF-8?q?Fix=20build=20error.=20The=20app=20builds=20and?= =?UTF-8?q?=20runs=20now=20=E2=80=94=C2=A0and=20then=20crashes.=20But=20st?= =?UTF-8?q?ill,=20it=E2=80=99s=20progress!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Evergreen/Base.lproj/MainWindow.storyboard | 25 ++++++++++++------- Evergreen/Data/DefaultFeedsImporter.swift | 8 +++--- .../Cell/TimelineStringUtilities.swift | 4 +-- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/Evergreen/Base.lproj/MainWindow.storyboard b/Evergreen/Base.lproj/MainWindow.storyboard index 7e0f9d112..3a38412a1 100644 --- a/Evergreen/Base.lproj/MainWindow.storyboard +++ b/Evergreen/Base.lproj/MainWindow.storyboard @@ -1,8 +1,8 @@ - + - + @@ -25,7 +25,7 @@ - + @@ -211,6 +211,9 @@ + + + @@ -232,8 +235,12 @@ + + + + @@ -278,7 +285,7 @@ - + @@ -286,7 +293,7 @@ - + @@ -357,7 +364,7 @@ - + @@ -374,7 +381,7 @@ - + @@ -397,7 +404,7 @@ - + @@ -472,7 +479,7 @@ - + diff --git a/Evergreen/Data/DefaultFeedsImporter.swift b/Evergreen/Data/DefaultFeedsImporter.swift index 85de9e8c3..ac55de3ca 100644 --- a/Evergreen/Data/DefaultFeedsImporter.swift +++ b/Evergreen/Data/DefaultFeedsImporter.swift @@ -47,11 +47,11 @@ struct FeedsImporter { } } } - + private static func feeds(with feedDictionaries: [DiskFeedDictionary], accountID: String) -> Set { - - let feeds = Set(feedDictionaries.map { Feed(accountID: accountID, dictionary: $0) }) - return feeds + + let feedArray = feedDictionaries.flatMap { Feed(accountID: accountID, dictionary: $0) } + return Set(feedArray) } } diff --git a/Evergreen/MainWindow/Timeline/Cell/TimelineStringUtilities.swift b/Evergreen/MainWindow/Timeline/Cell/TimelineStringUtilities.swift index c003231e3..17761b2a0 100644 --- a/Evergreen/MainWindow/Timeline/Cell/TimelineStringUtilities.swift +++ b/Evergreen/MainWindow/Timeline/Cell/TimelineStringUtilities.swift @@ -34,7 +34,7 @@ func timelineTruncatedFeedName(_ feed: Feed) -> String { } let maxFeedNameLength = 100 - if feedName.characters.count < maxFeedNameLength { + if feedName.count < maxFeedNameLength { truncatedFeedNameCache[feedName] = feedName return feedName } @@ -61,7 +61,7 @@ func timelineTruncatedTitle(_ article: Article) -> String { s = s.rs_stringByTrimmingWhitespace() let maxLength = 1000 - if s.characters.count < maxLength { + if s.count < maxLength { truncatedTitleCache[title] = s return s }