From f0f86953ae3ea5ee60ac6c128e8ca47497ca08bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kiel=20Gillard=20=F0=9F=A4=AA?= Date: Mon, 26 Oct 2020 10:27:36 +1100 Subject: [PATCH] iOS: Ingest a change of feed name on Feedly into NNW. #2520 --- ...yCreateFeedsForCollectionFoldersOperation.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Frameworks/Account/Feedly/Operations/FeedlyCreateFeedsForCollectionFoldersOperation.swift b/Frameworks/Account/Feedly/Operations/FeedlyCreateFeedsForCollectionFoldersOperation.swift index 264c046a1..b166d1e48 100644 --- a/Frameworks/Account/Feedly/Operations/FeedlyCreateFeedsForCollectionFoldersOperation.swift +++ b/Frameworks/Account/Feedly/Operations/FeedlyCreateFeedsForCollectionFoldersOperation.swift @@ -59,6 +59,20 @@ final class FeedlyCreateFeedsForCollectionFoldersOperation: FeedlyOperation { // find an existing feed previously added to the account if let feed = account.existingWebFeed(withWebFeedID: collectionFeed.id) { + + // If the feed was renamed on Feedly, ensure we ingest the new name. + if feed.nameForDisplay != collectionFeed.title { + feed.name = collectionFeed.title + + // Let the rest of the app (e.g.: the sidebar) know the feed name changed + // `editedName` would post this if its value is changing. + // Setting the `name` property has no side effects like this. + if feed.editedName != nil { + feed.editedName = nil + } else { + feed.postDisplayNameDidChangeNotification() + } + } return (feed, folder) } else { // find an existing feed we created below in an earlier value