diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift index 3f59fb39a..ea753ac16 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController.swift @@ -799,7 +799,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr // MARK: - Cell Configuring private func calculateRowHeight() -> CGFloat { - let longTitle = "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?" + let longTitle = "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the architect of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?" let prototypeID = "prototype" let status = ArticleStatus(articleID: prototypeID, read: false, starred: false, dateArrived: Date()) let prototypeArticle = Article(accountID: prototypeID, articleID: prototypeID, feedID: prototypeID, uniqueID: prototypeID, title: longTitle, contentHTML: nil, contentText: nil, url: nil, externalURL: nil, summary: nil, imageURL: nil, datePublished: nil, dateModified: nil, authors: nil, status: status) diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 81c92fc0e..f7441f472 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -171,7 +171,7 @@ 5144EA3B227A379E00D19003 /* ImportOPMLSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5144EA3A227A379E00D19003 /* ImportOPMLSheet.xib */; }; 5144EA40227A37EC00D19003 /* ImportOPMLWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5144EA3E227A37EC00D19003 /* ImportOPMLWindowController.swift */; }; 5144EA51227B8E4500D19003 /* AccountsFeedbinWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5144EA4F227B8E4500D19003 /* AccountsFeedbinWindowController.swift */; }; - 5148F4552336DB7000F8CD8B /* MasterTimelineTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5148F4542336DB7000F8CD8B /* MasterTimelineTitleView.swift */; }; + 5148F4552336DB7000F8CD8B /* MainTimelineTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5148F4542336DB7000F8CD8B /* MainTimelineTitleView.swift */; }; 514B7C8323205EFB00BAC947 /* RootSplitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 514B7C8223205EFB00BAC947 /* RootSplitViewController.swift */; }; 514C16CE24D2E63F009A3AFA /* Account in Frameworks */ = {isa = PBXBuildFile; productRef = 514C16CD24D2E63F009A3AFA /* Account */; }; 514C16DE24D2EF15009A3AFA /* RSTree in Frameworks */ = {isa = PBXBuildFile; productRef = 514C16DD24D2EF15009A3AFA /* RSTree */; }; @@ -181,10 +181,10 @@ 5154368B229404D1005E1CDF /* FaviconGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F76227716200050506E /* FaviconGenerator.swift */; }; 515D4FCA23257CB500EE1167 /* Node-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849A97971ED9EFAA007D329B /* Node-Extensions.swift */; }; 515D4FCC2325815A00EE1167 /* SafariExt.js in Resources */ = {isa = PBXBuildFile; fileRef = 515D4FCB2325815A00EE1167 /* SafariExt.js */; }; - 51627A6723861DA3007B3B4B /* MasterFeedViewController+Drag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51627A6623861DA3007B3B4B /* MasterFeedViewController+Drag.swift */; }; - 51627A6923861DED007B3B4B /* MasterFeedViewController+Drop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51627A6823861DED007B3B4B /* MasterFeedViewController+Drop.swift */; }; + 51627A6723861DA3007B3B4B /* MainFeedViewController+Drag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51627A6623861DA3007B3B4B /* MainFeedViewController+Drag.swift */; }; + 51627A6923861DED007B3B4B /* MainFeedViewController+Drop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51627A6823861DED007B3B4B /* MainFeedViewController+Drop.swift */; }; 51627A93238A3836007B3B4B /* CroppingPreviewParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51627A92238A3836007B3B4B /* CroppingPreviewParameters.swift */; }; - 516AE9B32371C372007DEEAA /* MasterFeedTableViewSectionHeaderLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE9B22371C372007DEEAA /* MasterFeedTableViewSectionHeaderLayout.swift */; }; + 516AE9B32371C372007DEEAA /* MainFeedTableViewSectionHeaderLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE9B22371C372007DEEAA /* MainFeedTableViewSectionHeaderLayout.swift */; }; 516AE9DF2372269A007DEEAA /* IconImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE9DE2372269A007DEEAA /* IconImage.swift */; }; 516AE9E02372269A007DEEAA /* IconImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516AE9DE2372269A007DEEAA /* IconImage.swift */; }; 516B695F24D2F33B00B5702F /* Account in Frameworks */ = {isa = PBXBuildFile; productRef = 516B695E24D2F33B00B5702F /* Account */; }; @@ -219,7 +219,7 @@ 51938DF2231AFC660055A1A0 /* SearchTimelineFeedDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51938DF1231AFC660055A1A0 /* SearchTimelineFeedDelegate.swift */; }; 51938DF3231AFC660055A1A0 /* SearchTimelineFeedDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51938DF1231AFC660055A1A0 /* SearchTimelineFeedDelegate.swift */; }; 5195C1DA2720205F00888867 /* ShadowTableChanges.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5195C1D92720205F00888867 /* ShadowTableChanges.swift */; }; - 5195C1DC2720BD3000888867 /* MasterFeedRowIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5195C1DB2720BD3000888867 /* MasterFeedRowIdentifier.swift */; }; + 5195C1DC2720BD3000888867 /* MainFeedRowIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5195C1DB2720BD3000888867 /* MainFeedRowIdentifier.swift */; }; 519B8D332143397200FA689C /* SharingServiceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519B8D322143397200FA689C /* SharingServiceDelegate.swift */; }; 519CA8E525841DB700EB079A /* CrashReporter in Frameworks */ = {isa = PBXBuildFile; productRef = 519CA8E425841DB700EB079A /* CrashReporter */; }; 519E743D22C663F900A78E47 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519E743422C663F900A78E47 /* SceneDelegate.swift */; }; @@ -275,16 +275,16 @@ 51C45259226508D300C03939 /* AppDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C45255226507D200C03939 /* AppDefaults.swift */; }; 51C4525A226508D600C03939 /* UIStoryboard-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C4524E226506F400C03939 /* UIStoryboard-Extensions.swift */; }; 51C4525C226508DF00C03939 /* String-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C45250226506F400C03939 /* String-Extensions.swift */; }; - 51C45268226508F600C03939 /* MasterFeedUnreadCountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C45261226508F600C03939 /* MasterFeedUnreadCountView.swift */; }; - 51C45269226508F600C03939 /* MasterFeedTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C45262226508F600C03939 /* MasterFeedTableViewCell.swift */; }; - 51C4526A226508F600C03939 /* MasterFeedTableViewCellLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C45263226508F600C03939 /* MasterFeedTableViewCellLayout.swift */; }; - 51C4526B226508F600C03939 /* MasterFeedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C45264226508F600C03939 /* MasterFeedViewController.swift */; }; - 51C452762265091600C03939 /* MasterTimelineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C4526E2265091600C03939 /* MasterTimelineViewController.swift */; }; + 51C45268226508F600C03939 /* MainFeedUnreadCountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C45261226508F600C03939 /* MainFeedUnreadCountView.swift */; }; + 51C45269226508F600C03939 /* MainFeedTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C45262226508F600C03939 /* MainFeedTableViewCell.swift */; }; + 51C4526A226508F600C03939 /* MainFeedTableViewCellLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C45263226508F600C03939 /* MainFeedTableViewCellLayout.swift */; }; + 51C4526B226508F600C03939 /* MainFeedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C45264226508F600C03939 /* MainFeedViewController.swift */; }; + 51C452762265091600C03939 /* MainTimelineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C4526E2265091600C03939 /* MainTimelineViewController.swift */; }; 51C452772265091600C03939 /* MultilineUILabelSizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C452702265091600C03939 /* MultilineUILabelSizer.swift */; }; - 51C452782265091600C03939 /* MasterTimelineCellData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C452712265091600C03939 /* MasterTimelineCellData.swift */; }; - 51C452792265091600C03939 /* MasterTimelineTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C452722265091600C03939 /* MasterTimelineTableViewCell.swift */; }; - 51C4527B2265091600C03939 /* MasterUnreadIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C452742265091600C03939 /* MasterUnreadIndicatorView.swift */; }; - 51C4527C2265091600C03939 /* MasterTimelineDefaultCellLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C452752265091600C03939 /* MasterTimelineDefaultCellLayout.swift */; }; + 51C452782265091600C03939 /* MainTimelineCellData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C452712265091600C03939 /* MainTimelineCellData.swift */; }; + 51C452792265091600C03939 /* MainTimelineTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C452722265091600C03939 /* MainTimelineTableViewCell.swift */; }; + 51C4527B2265091600C03939 /* MainUnreadIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C452742265091600C03939 /* MainUnreadIndicatorView.swift */; }; + 51C4527C2265091600C03939 /* MainTimelineDefaultCellLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C452752265091600C03939 /* MainTimelineDefaultCellLayout.swift */; }; 51C4527F2265092C00C03939 /* ArticleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C4527E2265092C00C03939 /* ArticleViewController.swift */; }; 51C452882265093600C03939 /* AddFeedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C452842265093600C03939 /* AddFeedViewController.swift */; }; 51C4528D2265095F00C03939 /* AddFolderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C4528B2265095F00C03939 /* AddFolderViewController.swift */; }; @@ -330,7 +330,7 @@ 51D205F028E3CF8D007C46EF /* LinkTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D205EE28E3CF8D007C46EF /* LinkTextField.swift */; }; 51D5948722668EFA00DFC836 /* MarkStatusCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84702AA31FA27AC0006B8943 /* MarkStatusCommand.swift */; }; 51D5D116291EEF5600AA1278 /* RefreshProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D5D114291EEDC600AA1278 /* RefreshProgressView.swift */; }; - 51D6A5BC23199C85001C27D8 /* MasterTimelineDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D6A5BB23199C85001C27D8 /* MasterTimelineDataSource.swift */; }; + 51D6A5BC23199C85001C27D8 /* MainTimelineDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D6A5BB23199C85001C27D8 /* MainTimelineDataSource.swift */; }; 51D87EE12311D34700E63F03 /* ActivityType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D87EE02311D34700E63F03 /* ActivityType.swift */; }; 51DC07982552083500A3F79F /* ArticleTextSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51DC07972552083500A3F79F /* ArticleTextSize.swift */; }; 51DC07992552083500A3F79F /* ArticleTextSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51DC07972552083500A3F79F /* ArticleTextSize.swift */; }; @@ -356,8 +356,8 @@ 51EF0F77227716200050506E /* FaviconGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F76227716200050506E /* FaviconGenerator.swift */; }; 51EF0F79227716380050506E /* ColorHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F78227716380050506E /* ColorHash.swift */; }; 51EF0F7A22771B890050506E /* ColorHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F78227716380050506E /* ColorHash.swift */; }; - 51EF0F7E2277A57D0050506E /* MasterTimelineAccessibilityCellLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F7D2277A57D0050506E /* MasterTimelineAccessibilityCellLayout.swift */; }; - 51EF0F802277A8330050506E /* MasterTimelineCellLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F7F2277A8330050506E /* MasterTimelineCellLayout.swift */; }; + 51EF0F7E2277A57D0050506E /* MainTimelineAccessibilityCellLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F7D2277A57D0050506E /* MainTimelineAccessibilityCellLayout.swift */; }; + 51EF0F802277A8330050506E /* MainTimelineCellLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F7F2277A8330050506E /* MainTimelineCellLayout.swift */; }; 51EFDA1B24E6D16A0085C3D6 /* SafariExt.js in Resources */ = {isa = PBXBuildFile; fileRef = 515D4FCB2325815A00EE1167 /* SafariExt.js */; }; 51F85BF52273625800C787DC /* Bundle-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51F85BF42273625800C787DC /* Bundle-Extensions.swift */; }; 51F85BF722749FA100C787DC /* UIFont-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51F85BF622749FA100C787DC /* UIFont-Extensions.swift */; }; @@ -371,7 +371,7 @@ 51FA73A52332BE110090D516 /* ArticleExtractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51FA73A32332BE110090D516 /* ArticleExtractor.swift */; }; 51FA73A72332BE880090D516 /* ExtractedArticle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51FA73A62332BE880090D516 /* ExtractedArticle.swift */; }; 51FA73A82332BE880090D516 /* ExtractedArticle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51FA73A62332BE880090D516 /* ExtractedArticle.swift */; }; - 51FD413B2342BD0500880194 /* MasterTimelineUnreadCountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51FD413A2342BD0500880194 /* MasterTimelineUnreadCountView.swift */; }; + 51FD413B2342BD0500880194 /* MainTimelineUnreadCountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51FD413A2342BD0500880194 /* MainTimelineUnreadCountView.swift */; }; 51FE10032345529D0056195D /* UserNotificationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51FE10022345529D0056195D /* UserNotificationManager.swift */; }; 51FE10042345529D0056195D /* UserNotificationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51FE10022345529D0056195D /* UserNotificationManager.swift */; }; 51FE10092346739D0056195D /* ActivityType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D87EE02311D34700E63F03 /* ActivityType.swift */; }; @@ -785,7 +785,7 @@ DF5124F22A2310A100BBAB1F /* AccountsReaderAPI.xib in Resources */ = {isa = PBXBuildFile; fileRef = DF5124F42A2310A100BBAB1F /* AccountsReaderAPI.xib */; }; DF5124FD2A23110F00BBAB1F /* CrashReporterWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = DF5125002A23110F00BBAB1F /* CrashReporterWindow.xib */; }; DF5124FE2A23110F00BBAB1F /* CrashReporterWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = DF5125002A23110F00BBAB1F /* CrashReporterWindow.xib */; }; - DF5125032A23116B00BBAB1F /* MasterTimelineTitleView.xib in Resources */ = {isa = PBXBuildFile; fileRef = DF5125052A23116B00BBAB1F /* MasterTimelineTitleView.xib */; }; + DF5125032A23116B00BBAB1F /* MainTimelineTitleView.xib in Resources */ = {isa = PBXBuildFile; fileRef = DF5125052A23116B00BBAB1F /* MainTimelineTitleView.xib */; }; DF5125082A23118300BBAB1F /* Add.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DF51250A2A23118300BBAB1F /* Add.storyboard */; }; DF51250D2A23119800BBAB1F /* AddFeedSelectFolderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DF51250F2A23119800BBAB1F /* AddFeedSelectFolderTableViewCell.xib */; }; DF59F072292085B800ACD33D /* ColorPaletteSelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF59F071292085B800ACD33D /* ColorPaletteSelectorView.swift */; }; @@ -1195,15 +1195,15 @@ 5144EA372279FC6200D19003 /* AccountsAddLocalWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsAddLocalWindowController.swift; sourceTree = ""; }; 5144EA3E227A37EC00D19003 /* ImportOPMLWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImportOPMLWindowController.swift; sourceTree = ""; }; 5144EA4F227B8E4500D19003 /* AccountsFeedbinWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsFeedbinWindowController.swift; sourceTree = ""; }; - 5148F4542336DB7000F8CD8B /* MasterTimelineTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterTimelineTitleView.swift; sourceTree = ""; }; + 5148F4542336DB7000F8CD8B /* MainTimelineTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTimelineTitleView.swift; sourceTree = ""; }; 514B7C8223205EFB00BAC947 /* RootSplitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootSplitViewController.swift; sourceTree = ""; }; 515D4FCB2325815A00EE1167 /* SafariExt.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = SafariExt.js; sourceTree = ""; }; 515D4FCD2325909200EE1167 /* NetNewsWire_iOS_ShareExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NetNewsWire_iOS_ShareExtension.entitlements; sourceTree = ""; }; 515D4FCE2325B3D000EE1167 /* NetNewsWire_iOSshareextension_target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NetNewsWire_iOSshareextension_target.xcconfig; sourceTree = ""; }; - 51627A6623861DA3007B3B4B /* MasterFeedViewController+Drag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MasterFeedViewController+Drag.swift"; sourceTree = ""; }; - 51627A6823861DED007B3B4B /* MasterFeedViewController+Drop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MasterFeedViewController+Drop.swift"; sourceTree = ""; }; + 51627A6623861DA3007B3B4B /* MainFeedViewController+Drag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MainFeedViewController+Drag.swift"; sourceTree = ""; }; + 51627A6823861DED007B3B4B /* MainFeedViewController+Drop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MainFeedViewController+Drop.swift"; sourceTree = ""; }; 51627A92238A3836007B3B4B /* CroppingPreviewParameters.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CroppingPreviewParameters.swift; sourceTree = ""; }; - 516AE9B22371C372007DEEAA /* MasterFeedTableViewSectionHeaderLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterFeedTableViewSectionHeaderLayout.swift; sourceTree = ""; }; + 516AE9B22371C372007DEEAA /* MainFeedTableViewSectionHeaderLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFeedTableViewSectionHeaderLayout.swift; sourceTree = ""; }; 516AE9DE2372269A007DEEAA /* IconImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconImage.swift; sourceTree = ""; }; 51707438232AA97100A461A3 /* ShareFolderPickerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareFolderPickerController.swift; sourceTree = ""; }; 517630032336215100E15FFF /* main.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = main.js; sourceTree = ""; }; @@ -1225,7 +1225,7 @@ 51934CCD2310792F006127BE /* ActivityManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityManager.swift; sourceTree = ""; }; 51938DF1231AFC660055A1A0 /* SearchTimelineFeedDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchTimelineFeedDelegate.swift; sourceTree = ""; }; 5195C1D92720205F00888867 /* ShadowTableChanges.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShadowTableChanges.swift; sourceTree = ""; }; - 5195C1DB2720BD3000888867 /* MasterFeedRowIdentifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterFeedRowIdentifier.swift; sourceTree = ""; }; + 5195C1DB2720BD3000888867 /* MainFeedRowIdentifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFeedRowIdentifier.swift; sourceTree = ""; }; 519B8D322143397200FA689C /* SharingServiceDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharingServiceDelegate.swift; sourceTree = ""; }; 519E743422C663F900A78E47 /* SceneDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 51A052CD244FB9D6006C2024 /* AddFeedWindowControllerDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AddFeedWindowControllerDelegate.swift; path = AddFeed/AddFeedWindowControllerDelegate.swift; sourceTree = ""; }; @@ -1250,16 +1250,16 @@ 51C45250226506F400C03939 /* String-Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String-Extensions.swift"; sourceTree = ""; }; 51C45254226507D200C03939 /* AppAssets.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppAssets.swift; sourceTree = ""; }; 51C45255226507D200C03939 /* AppDefaults.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDefaults.swift; sourceTree = ""; }; - 51C45261226508F600C03939 /* MasterFeedUnreadCountView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterFeedUnreadCountView.swift; sourceTree = ""; }; - 51C45262226508F600C03939 /* MasterFeedTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterFeedTableViewCell.swift; sourceTree = ""; }; - 51C45263226508F600C03939 /* MasterFeedTableViewCellLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterFeedTableViewCellLayout.swift; sourceTree = ""; }; - 51C45264226508F600C03939 /* MasterFeedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterFeedViewController.swift; sourceTree = ""; }; - 51C4526E2265091600C03939 /* MasterTimelineViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterTimelineViewController.swift; sourceTree = ""; }; + 51C45261226508F600C03939 /* MainFeedUnreadCountView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainFeedUnreadCountView.swift; sourceTree = ""; }; + 51C45262226508F600C03939 /* MainFeedTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainFeedTableViewCell.swift; sourceTree = ""; }; + 51C45263226508F600C03939 /* MainFeedTableViewCellLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainFeedTableViewCellLayout.swift; sourceTree = ""; }; + 51C45264226508F600C03939 /* MainFeedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainFeedViewController.swift; sourceTree = ""; }; + 51C4526E2265091600C03939 /* MainTimelineViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainTimelineViewController.swift; sourceTree = ""; }; 51C452702265091600C03939 /* MultilineUILabelSizer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MultilineUILabelSizer.swift; sourceTree = ""; }; - 51C452712265091600C03939 /* MasterTimelineCellData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterTimelineCellData.swift; sourceTree = ""; }; - 51C452722265091600C03939 /* MasterTimelineTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterTimelineTableViewCell.swift; sourceTree = ""; }; - 51C452742265091600C03939 /* MasterUnreadIndicatorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterUnreadIndicatorView.swift; sourceTree = ""; }; - 51C452752265091600C03939 /* MasterTimelineDefaultCellLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MasterTimelineDefaultCellLayout.swift; sourceTree = ""; }; + 51C452712265091600C03939 /* MainTimelineCellData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainTimelineCellData.swift; sourceTree = ""; }; + 51C452722265091600C03939 /* MainTimelineTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainTimelineTableViewCell.swift; sourceTree = ""; }; + 51C452742265091600C03939 /* MainUnreadIndicatorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainUnreadIndicatorView.swift; sourceTree = ""; }; + 51C452752265091600C03939 /* MainTimelineDefaultCellLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainTimelineDefaultCellLayout.swift; sourceTree = ""; }; 51C4527E2265092C00C03939 /* ArticleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArticleViewController.swift; sourceTree = ""; }; 51C452842265093600C03939 /* AddFeedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddFeedViewController.swift; sourceTree = ""; }; 51C4528B2265095F00C03939 /* AddFolderViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddFolderViewController.swift; sourceTree = ""; }; @@ -1274,7 +1274,7 @@ 51D0214526ED617100FF2E0F /* core.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = core.css; sourceTree = ""; }; 51D205EE28E3CF8D007C46EF /* LinkTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkTextField.swift; sourceTree = ""; }; 51D5D114291EEDC600AA1278 /* RefreshProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RefreshProgressView.swift; sourceTree = ""; }; - 51D6A5BB23199C85001C27D8 /* MasterTimelineDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterTimelineDataSource.swift; sourceTree = ""; }; + 51D6A5BB23199C85001C27D8 /* MainTimelineDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTimelineDataSource.swift; sourceTree = ""; }; 51D87EE02311D34700E63F03 /* ActivityType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityType.swift; sourceTree = ""; }; 51DC07972552083500A3F79F /* ArticleTextSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleTextSize.swift; sourceTree = ""; }; 51DEE81126FB9233006DAA56 /* Appanoose.nnwtheme */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Appanoose.nnwtheme; sourceTree = ""; }; @@ -1294,8 +1294,8 @@ 51EC114B2149FE3300B296E3 /* FolderTreeMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = FolderTreeMenu.swift; path = AddFeed/FolderTreeMenu.swift; sourceTree = ""; }; 51EF0F76227716200050506E /* FaviconGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaviconGenerator.swift; sourceTree = ""; }; 51EF0F78227716380050506E /* ColorHash.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorHash.swift; sourceTree = ""; }; - 51EF0F7D2277A57D0050506E /* MasterTimelineAccessibilityCellLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterTimelineAccessibilityCellLayout.swift; sourceTree = ""; }; - 51EF0F7F2277A8330050506E /* MasterTimelineCellLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterTimelineCellLayout.swift; sourceTree = ""; }; + 51EF0F7D2277A57D0050506E /* MainTimelineAccessibilityCellLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTimelineAccessibilityCellLayout.swift; sourceTree = ""; }; + 51EF0F7F2277A8330050506E /* MainTimelineCellLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTimelineCellLayout.swift; sourceTree = ""; }; 51F805D32428499E0022C792 /* NetNewsWire-dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "NetNewsWire-dev.entitlements"; sourceTree = ""; }; 51F805ED24284C1C0022C792 /* NetNewsWire-dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "NetNewsWire-dev.entitlements"; sourceTree = ""; }; 51F85BF42273625800C787DC /* Bundle-Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Bundle-Extensions.swift"; sourceTree = ""; }; @@ -1308,7 +1308,7 @@ 51F9F3FA23DFB25700A314FD /* Animations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animations.swift; sourceTree = ""; }; 51FA73A32332BE110090D516 /* ArticleExtractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArticleExtractor.swift; sourceTree = ""; }; 51FA73A62332BE880090D516 /* ExtractedArticle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtractedArticle.swift; sourceTree = ""; }; - 51FD413A2342BD0500880194 /* MasterTimelineUnreadCountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterTimelineUnreadCountView.swift; sourceTree = ""; }; + 51FD413A2342BD0500880194 /* MainTimelineUnreadCountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTimelineUnreadCountView.swift; sourceTree = ""; }; 51FE10022345529D0056195D /* UserNotificationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserNotificationManager.swift; sourceTree = ""; }; 51FFF0C3235EE8E5002762AA /* VibrantButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VibrantButton.swift; sourceTree = ""; }; 55E15BCA229D65A900D6602A /* AccountsReaderAPIWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountsReaderAPIWindowController.swift; sourceTree = ""; }; @@ -1534,7 +1534,7 @@ C4A396742A2AE86100C89D55 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/AccountsNewsBlur.strings"; sourceTree = ""; }; C4A396762A2AE86500C89D55 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/AccountsReaderAPI.strings"; sourceTree = ""; }; C4A396782A2AE8B400C89D55 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Add.strings"; sourceTree = ""; }; - C4A3967A2A2AE8E100C89D55 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/MasterTimelineTitleView.strings"; sourceTree = ""; }; + C4A3967A2A2AE8E100C89D55 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/MainTimelineTitleView.strings"; sourceTree = ""; }; C4A3967B2A2AE96D00C89D55 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/AddFeedSelectFolderTableViewCell.strings"; sourceTree = ""; }; C4A3967C2A2AEC5400C89D55 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/NNW3OpenPanelAccessoryView.strings"; sourceTree = ""; }; C4A3967D2A2AEC5400C89D55 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/ExportOPMLSheet.strings"; sourceTree = ""; }; @@ -1588,8 +1588,8 @@ DF5124F62A2310A500BBAB1F /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "en-GB.lproj/AccountsReaderAPI.strings"; sourceTree = ""; }; DF5124FF2A23110F00BBAB1F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/CrashReporterWindow.xib; sourceTree = ""; }; DF5125022A23111200BBAB1F /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "en-GB.lproj/CrashReporterWindow.strings"; sourceTree = ""; }; - DF5125042A23116B00BBAB1F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MasterTimelineTitleView.xib; sourceTree = ""; }; - DF5125072A23116F00BBAB1F /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "en-GB.lproj/MasterTimelineTitleView.strings"; sourceTree = ""; }; + DF5125042A23116B00BBAB1F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainTimelineTitleView.xib; sourceTree = ""; }; + DF5125072A23116F00BBAB1F /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "en-GB.lproj/MainTimelineTitleView.strings"; sourceTree = ""; }; DF5125092A23118300BBAB1F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Add.storyboard; sourceTree = ""; }; DF51250C2A23118700BBAB1F /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "en-GB.lproj/Add.strings"; sourceTree = ""; }; DF51250E2A23119800BBAB1F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/AddFeedSelectFolderTableViewCell.xib; sourceTree = ""; }; @@ -2079,55 +2079,55 @@ path = "UIKit Extensions"; sourceTree = ""; }; - 51C4525D226508F600C03939 /* MasterFeed */ = { + 51C4525D226508F600C03939 /* MainFeed */ = { isa = PBXGroup; children = ( - 51C45264226508F600C03939 /* MasterFeedViewController.swift */, - 51627A6623861DA3007B3B4B /* MasterFeedViewController+Drag.swift */, - 51627A6823861DED007B3B4B /* MasterFeedViewController+Drop.swift */, + 51C45264226508F600C03939 /* MainFeedViewController.swift */, + 51627A6623861DA3007B3B4B /* MainFeedViewController+Drag.swift */, + 51627A6823861DED007B3B4B /* MainFeedViewController+Drop.swift */, 51D5D114291EEDC600AA1278 /* RefreshProgressView.swift */, 5195C1D92720205F00888867 /* ShadowTableChanges.swift */, 51C45260226508F600C03939 /* Cell */, ); - path = MasterFeed; + path = MainFeed; sourceTree = ""; }; 51C45260226508F600C03939 /* Cell */ = { isa = PBXGroup; children = ( - 5195C1DB2720BD3000888867 /* MasterFeedRowIdentifier.swift */, - 51C45262226508F600C03939 /* MasterFeedTableViewCell.swift */, - 51C45263226508F600C03939 /* MasterFeedTableViewCellLayout.swift */, + 5195C1DB2720BD3000888867 /* MainFeedRowIdentifier.swift */, + 51C45262226508F600C03939 /* MainFeedTableViewCell.swift */, + 51C45263226508F600C03939 /* MainFeedTableViewCellLayout.swift */, 512E08F722688F7C00BDCFDD /* MasterFeedTableViewSectionHeader.swift */, - 516AE9B22371C372007DEEAA /* MasterFeedTableViewSectionHeaderLayout.swift */, - 51C45261226508F600C03939 /* MasterFeedUnreadCountView.swift */, + 516AE9B22371C372007DEEAA /* MainFeedTableViewSectionHeaderLayout.swift */, + 51C45261226508F600C03939 /* MainFeedUnreadCountView.swift */, ); path = Cell; sourceTree = ""; }; - 51C4526D2265091600C03939 /* MasterTimeline */ = { + 51C4526D2265091600C03939 /* MainTimeline */ = { isa = PBXGroup; children = ( - 51C4526E2265091600C03939 /* MasterTimelineViewController.swift */, - 51D6A5BB23199C85001C27D8 /* MasterTimelineDataSource.swift */, - 5148F4542336DB7000F8CD8B /* MasterTimelineTitleView.swift */, - DF5125052A23116B00BBAB1F /* MasterTimelineTitleView.xib */, - 51FD413A2342BD0500880194 /* MasterTimelineUnreadCountView.swift */, + 51C4526E2265091600C03939 /* MainTimelineViewController.swift */, + 51D6A5BB23199C85001C27D8 /* MainTimelineDataSource.swift */, + 5148F4542336DB7000F8CD8B /* MainTimelineTitleView.swift */, + DF5125052A23116B00BBAB1F /* MainTimelineTitleView.xib */, + 51FD413A2342BD0500880194 /* MainTimelineUnreadCountView.swift */, FFD43E372340F320009E5CA3 /* MarkAsReadAlertController.swift */, 51C4526F2265091600C03939 /* Cell */, ); - path = MasterTimeline; + path = MainTimeline; sourceTree = ""; }; 51C4526F2265091600C03939 /* Cell */ = { isa = PBXGroup; children = ( - 51EF0F7D2277A57D0050506E /* MasterTimelineAccessibilityCellLayout.swift */, - 51C452712265091600C03939 /* MasterTimelineCellData.swift */, - 51EF0F7F2277A8330050506E /* MasterTimelineCellLayout.swift */, - 51C452752265091600C03939 /* MasterTimelineDefaultCellLayout.swift */, - 51C452722265091600C03939 /* MasterTimelineTableViewCell.swift */, - 51C452742265091600C03939 /* MasterUnreadIndicatorView.swift */, + 51EF0F7D2277A57D0050506E /* MainTimelineAccessibilityCellLayout.swift */, + 51C452712265091600C03939 /* MainTimelineCellData.swift */, + 51EF0F7F2277A8330050506E /* MainTimelineCellLayout.swift */, + 51C452752265091600C03939 /* MainTimelineDefaultCellLayout.swift */, + 51C452722265091600C03939 /* MainTimelineTableViewCell.swift */, + 51C452742265091600C03939 /* MainUnreadIndicatorView.swift */, 51C452702265091600C03939 /* MultilineUILabelSizer.swift */, 51F85BFC2275DCA800C787DC /* SingleLineUILabelSizer.swift */, ); @@ -2720,8 +2720,8 @@ 51BB7C262335A8E5008E8144 /* ArticleActivityItemSource.swift */, C5A6ED5123C9AF4300AB6BE2 /* TitleActivityItemSource.swift */, 51B62E67233186730085F949 /* IconView.swift */, - 51C4525D226508F600C03939 /* MasterFeed */, - 51C4526D2265091600C03939 /* MasterTimeline */, + 51C4525D226508F600C03939 /* MainFeed */, + 51C4526D2265091600C03939 /* MainTimeline */, 51C4527D2265092C00C03939 /* Article */, 516A093E236123A800EAE89B /* Account */, 51C452802265093600C03939 /* Add */, @@ -3531,7 +3531,7 @@ DFCE4F9228EF26F100405869 /* About.plist in Resources */, 5137C2E626F3F52D009EFEDB /* Sepia.nnwtheme in Resources */, 517630052336215100E15FFF /* main.js in Resources */, - DF5125032A23116B00BBAB1F /* MasterTimelineTitleView.xib in Resources */, + DF5125032A23116B00BBAB1F /* MainTimelineTitleView.xib in Resources */, 511D43D0231FA62500FB1562 /* TimelineKeyboardShortcuts.plist in Resources */, DF5125082A23118300BBAB1F /* Add.storyboard in Resources */, 511D43EF231FBDE900FB1562 /* LaunchScreenPad.storyboard in Resources */, @@ -4111,7 +4111,7 @@ 51A9A5F52380F6A60033AADF /* ModalNavigationController.swift in Sources */, DFBB4EAE2951BC0200639228 /* NNWThemeDocument.swift in Sources */, 51EAED96231363EF00A9EEE3 /* NonIntrinsicButton.swift in Sources */, - 51C4527B2265091600C03939 /* MasterUnreadIndicatorView.swift in Sources */, + 51C4527B2265091600C03939 /* MainUnreadIndicatorView.swift in Sources */, 5186A635235EF3A800C97195 /* VibrantLabel.swift in Sources */, 51F85BF92274AA7B00C787DC /* UIBarButtonItem-Extensions.swift in Sources */, 51B62E68233186730085F949 /* IconView.swift in Sources */, @@ -4120,11 +4120,11 @@ 51C45291226509C800C03939 /* SmartFeed.swift in Sources */, 51C452A722650A3D00C03939 /* RSImage-Extensions.swift in Sources */, 511B9807237DCAC90028BCAA /* UserInfoKey.swift in Sources */, - 51C45269226508F600C03939 /* MasterFeedTableViewCell.swift in Sources */, + 51C45269226508F600C03939 /* MainFeedTableViewCell.swift in Sources */, 51F85BFD2275DCA800C787DC /* SingleLineUILabelSizer.swift in Sources */, 51E43962238037C400015C31 /* AddFeedFolderViewController.swift in Sources */, 51C4528F226509BD00C03939 /* UnreadFeed.swift in Sources */, - 51FD413B2342BD0500880194 /* MasterTimelineUnreadCountView.swift in Sources */, + 51FD413B2342BD0500880194 /* MainTimelineUnreadCountView.swift in Sources */, DFB3497A294A962D00BC81AD /* AddAccountListView.swift in Sources */, 513146B2235A81A400387FDC /* AddFeedIntentHandler.swift in Sources */, 51D87EE12311D34700E63F03 /* ActivityType.swift in Sources */, @@ -4145,9 +4145,9 @@ FF3ABF162325AF5D0074C542 /* ArticleSorter.swift in Sources */, 51C4525C226508DF00C03939 /* String-Extensions.swift in Sources */, 51F9F3F923DFB16300A314FD /* UITableView-Extensions.swift in Sources */, - 51C452792265091600C03939 /* MasterTimelineTableViewCell.swift in Sources */, + 51C452792265091600C03939 /* MainTimelineTableViewCell.swift in Sources */, DFFC4E7428E95C01006B82AF /* AboutView.swift in Sources */, - 51C4526B226508F600C03939 /* MasterFeedViewController.swift in Sources */, + 51C4526B226508F600C03939 /* MainFeedViewController.swift in Sources */, 5126EE97226CB48A00C22AFC /* SceneCoordinator.swift in Sources */, 84CAFCB022BC8C35007694F0 /* FetchRequestOperation.swift in Sources */, DFD406FA291FB5E400C02962 /* SettingsRows.swift in Sources */, @@ -4183,18 +4183,18 @@ 51C45258226508CF00C03939 /* AppAssets.swift in Sources */, DF28B451294EFC6C00C4D8CA /* View+DismissOnAccountAdd.swift in Sources */, 51FA73A82332BE880090D516 /* ExtractedArticle.swift in Sources */, - 51C4527C2265091600C03939 /* MasterTimelineDefaultCellLayout.swift in Sources */, + 51C4527C2265091600C03939 /* MainTimelineDefaultCellLayout.swift in Sources */, 51E4398023805EBC00015C31 /* AddComboTableViewCell.swift in Sources */, 51C4529A22650A0400C03939 /* ArticleTheme.swift in Sources */, 51C4527F2265092C00C03939 /* ArticleViewController.swift in Sources */, DFBB4EB02951BCAC00639228 /* ArticleThemeManagerView.swift in Sources */, - 51C4526A226508F600C03939 /* MasterFeedTableViewCellLayout.swift in Sources */, + 51C4526A226508F600C03939 /* MainFeedTableViewCellLayout.swift in Sources */, 51C452AE2265104D00C03939 /* ArticleStringFormatter.swift in Sources */, 512E08E62268800D00BDCFDD /* FolderTreeControllerDelegate.swift in Sources */, 51A9A60A2382FD240033AADF /* PoppableGestureRecognizerDelegate.swift in Sources */, 51DC079A2552083500A3F79F /* ArticleTextSize.swift in Sources */, 51C4529922650A0000C03939 /* ArticleThemesManager.swift in Sources */, - 51EF0F802277A8330050506E /* MasterTimelineCellLayout.swift in Sources */, + 51EF0F802277A8330050506E /* MainTimelineCellLayout.swift in Sources */, 51F85BF722749FA100C787DC /* UIFont-Extensions.swift in Sources */, 51C452AF2265108300C03939 /* ArticleArray.swift in Sources */, 51D5D116291EEF5600AA1278 /* RefreshProgressView.swift in Sources */, @@ -4217,11 +4217,11 @@ DFD406FC291FB63B00C02962 /* SettingsHelpSheets.swift in Sources */, 51F85BFB2275D85000C787DC /* Array-Extensions.swift in Sources */, 51C452AC22650FD200C03939 /* AppNotifications.swift in Sources */, - 51EF0F7E2277A57D0050506E /* MasterTimelineAccessibilityCellLayout.swift in Sources */, + 51EF0F7E2277A57D0050506E /* MainTimelineAccessibilityCellLayout.swift in Sources */, 512D554423C804DE0023FFFA /* OpenInSafariActivity.swift in Sources */, DFB34994294C0E3900BC81AD /* ReaderAPIAddAccountView.swift in Sources */, - 51C452762265091600C03939 /* MasterTimelineViewController.swift in Sources */, - 5195C1DC2720BD3000888867 /* MasterFeedRowIdentifier.swift in Sources */, + 51C452762265091600C03939 /* MainTimelineViewController.swift in Sources */, + 5195C1DC2720BD3000888867 /* MainFeedRowIdentifier.swift in Sources */, 5108F6D823763094001ABC45 /* TickMarkSlider.swift in Sources */, DF3630EF293618A900326FB8 /* SettingsViewModel.swift in Sources */, 51C452882265093600C03939 /* AddFeedViewController.swift in Sources */, @@ -4234,9 +4234,9 @@ 51C266EA238C334800F53014 /* ContextMenuPreviewViewController.swift in Sources */, 173A642C2547BE9600267F6E /* AccountType+Helpers.swift in Sources */, DFE522A32953DEF400376B77 /* CustomInsetGroupedRowStyle.swift in Sources */, - 51627A6923861DED007B3B4B /* MasterFeedViewController+Drop.swift in Sources */, + 51627A6923861DED007B3B4B /* MainFeedViewController+Drop.swift in Sources */, 514219372352510100E07E2C /* ImageScrollView.swift in Sources */, - 516AE9B32371C372007DEEAA /* MasterFeedTableViewSectionHeaderLayout.swift in Sources */, + 516AE9B32371C372007DEEAA /* MainFeedTableViewSectionHeaderLayout.swift in Sources */, D3555BF524664566005E48C3 /* ArticleSearchBar.swift in Sources */, DF28B44D294ED52700C4D8CA /* View+DismissOnExternalContext.swift in Sources */, 8454C3F3263F2D8700E3F9C7 /* IconImageCache.swift in Sources */, @@ -4250,7 +4250,7 @@ DF84E563295122BA0045C334 /* TimelineCustomizerView.swift in Sources */, 512E09012268907400BDCFDD /* MasterFeedTableViewSectionHeader.swift in Sources */, 516AE9E02372269A007DEEAA /* IconImage.swift in Sources */, - 51C45268226508F600C03939 /* MasterFeedUnreadCountView.swift in Sources */, + 51C45268226508F600C03939 /* MainFeedUnreadCountView.swift in Sources */, DFB349A4294E914D00BC81AD /* AccountSectionHeader.swift in Sources */, D3A39865246505DF00F9A366 /* FindInArticleActivity.swift in Sources */, 5183CCD0226E1E880010922C /* NonIntrinsicLabel.swift in Sources */, @@ -4260,14 +4260,14 @@ FFD43E412340F488009E5CA3 /* MarkAsReadAlertController.swift in Sources */, 51C452A322650A1E00C03939 /* HTMLMetadataDownloader.swift in Sources */, 51C4528D2265095F00C03939 /* AddFolderViewController.swift in Sources */, - 51C452782265091600C03939 /* MasterTimelineCellData.swift in Sources */, - 5148F4552336DB7000F8CD8B /* MasterTimelineTitleView.swift in Sources */, - 51627A6723861DA3007B3B4B /* MasterFeedViewController+Drag.swift in Sources */, + 51C452782265091600C03939 /* MainTimelineCellData.swift in Sources */, + 5148F4552336DB7000F8CD8B /* MainTimelineTitleView.swift in Sources */, + 51627A6723861DA3007B3B4B /* MainFeedViewController+Drag.swift in Sources */, 51FFF0C4235EE8E5002762AA /* VibrantButton.swift in Sources */, 51C45259226508D300C03939 /* AppDefaults.swift in Sources */, 511D4419231FC02D00FB1562 /* KeyboardManager.swift in Sources */, 51C45293226509C800C03939 /* StarredFeedDelegate.swift in Sources */, - 51D6A5BC23199C85001C27D8 /* MasterTimelineDataSource.swift in Sources */, + 51D6A5BC23199C85001C27D8 /* MainTimelineDataSource.swift in Sources */, 51BC4B01247277E0000A6ED8 /* URL-Extensions.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -4780,14 +4780,14 @@ name = CrashReporterWindow.xib; sourceTree = ""; }; - DF5125052A23116B00BBAB1F /* MasterTimelineTitleView.xib */ = { + DF5125052A23116B00BBAB1F /* MainTimelineTitleView.xib */ = { isa = PBXVariantGroup; children = ( DF5125042A23116B00BBAB1F /* Base */, DF5125072A23116F00BBAB1F /* en-GB */, C4A3967A2A2AE8E100C89D55 /* zh-Hans */, ); - name = MasterTimelineTitleView.xib; + name = MainTimelineTitleView.xib; sourceTree = ""; }; DF51250A2A23118300BBAB1F /* Add.storyboard */ = { diff --git a/iOS/Article/ArticleViewController.swift b/iOS/Article/ArticleViewController.swift index f5a0f102e..663558a11 100644 --- a/iOS/Article/ArticleViewController.swift +++ b/iOS/Article/ArticleViewController.swift @@ -617,7 +617,7 @@ private extension ArticleViewController { func updateUnreadCountIndicator() { if currentUnreadCount > 0 && (traitCollection.userInterfaceIdiom == .phone || lastKnownDisplayMode == .secondaryOnly) { - let unreadCountView = MasterTimelineUnreadCountView(frame: .zero) + let unreadCountView = MainTimelineUnreadCountView(frame: .zero) unreadCountView.unreadCount = currentUnreadCount unreadCountView.setFrameIfNotEqual(CGRect(x: 0, y: 0, width: unreadCountView.intrinsicContentSize.width, height: unreadCountView.intrinsicContentSize.height)) navigationItem.leftBarButtonItem = UIBarButtonItem(customView: unreadCountView) diff --git a/iOS/IconView.swift b/iOS/IconView.swift index 90c61b150..7d1e841e5 100644 --- a/iOS/IconView.swift +++ b/iOS/IconView.swift @@ -77,7 +77,7 @@ final class IconView: UIView { private extension IconView { func commonInit() { - layer.cornerRadius = MasterTimelineDefaultCellLayout.iconCornerRadius + layer.cornerRadius = MainTimelineDefaultCellLayout.iconCornerRadius clipsToBounds = true addSubview(imageView) } diff --git a/iOS/MasterFeed/Cell/MasterFeedRowIdentifier.swift b/iOS/MainFeed/Cell/MainFeedRowIdentifier.swift similarity index 86% rename from iOS/MasterFeed/Cell/MasterFeedRowIdentifier.swift rename to iOS/MainFeed/Cell/MainFeedRowIdentifier.swift index 8737decf3..4a51a5e7a 100644 --- a/iOS/MasterFeed/Cell/MasterFeedRowIdentifier.swift +++ b/iOS/MainFeed/Cell/MainFeedRowIdentifier.swift @@ -8,7 +8,7 @@ import Foundation -class MasterFeedRowIdentifier: NSObject, NSCopying { +class MainFeedRowIdentifier: NSObject, NSCopying { var indexPath: IndexPath diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift b/iOS/MainFeed/Cell/MainFeedTableViewCell.swift similarity index 83% rename from iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift rename to iOS/MainFeed/Cell/MainFeedTableViewCell.swift index 1161a41a2..bc67c8485 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewCell.swift +++ b/iOS/MainFeed/Cell/MainFeedTableViewCell.swift @@ -11,13 +11,13 @@ import RSCore import Account import RSTree -protocol MasterFeedTableViewCellDelegate: AnyObject { - func masterFeedTableViewCellDisclosureDidToggle(_ sender: MasterFeedTableViewCell, expanding: Bool) +protocol MainFeedTableViewCellDelegate: AnyObject { + func mainFeedTableViewCellDisclosureDidToggle(_ sender: MainFeedTableViewCell, expanding: Bool) } -@MainActor final class MasterFeedTableViewCell : VibrantTableViewCell { +@MainActor final class MainFeedTableViewCell : VibrantTableViewCell { - weak var delegate: MasterFeedTableViewCellDelegate? + weak var delegate: MainFeedTableViewCellDelegate? override var accessibilityLabel: String? { set {} @@ -111,7 +111,7 @@ protocol MasterFeedTableViewCellDelegate: AnyObject { private var isDisclosureExpanded = false private var disclosureButton: UIButton? - private var unreadCountView = MasterFeedUnreadCountView(frame: CGRect.zero) + private var unreadCountView = MainFeedUnreadCountView(frame: CGRect.zero) private var isShowingEditControl = false required init?(coder: NSCoder) { @@ -147,13 +147,13 @@ protocol MasterFeedTableViewCellDelegate: AnyObject { } override func sizeThatFits(_ size: CGSize) -> CGSize { - let layout = MasterFeedTableViewCellLayout(cellWidth: bounds.size.width, insets: safeAreaInsets, label: titleView, unreadCountView: unreadCountView, showingEditingControl: isShowingEditControl, indent: indentationLevel == 1, shouldShowDisclosure: isDisclosureAvailable, itemIsInFolder: itemIsInFolder) + let layout = MainFeedTableViewCellLayout(cellWidth: bounds.size.width, insets: safeAreaInsets, label: titleView, unreadCountView: unreadCountView, showingEditingControl: isShowingEditControl, indent: indentationLevel == 1, shouldShowDisclosure: isDisclosureAvailable, itemIsInFolder: itemIsInFolder) return CGSize(width: bounds.width, height: layout.height) } override func layoutSubviews() { super.layoutSubviews() - let layout = MasterFeedTableViewCellLayout(cellWidth: bounds.size.width, insets: safeAreaInsets, label: titleView, unreadCountView: unreadCountView, showingEditingControl: isShowingEditControl, indent: indentationLevel == 1, shouldShowDisclosure: isDisclosureAvailable, itemIsInFolder: itemIsInFolder) + let layout = MainFeedTableViewCellLayout(cellWidth: bounds.size.width, insets: safeAreaInsets, label: titleView, unreadCountView: unreadCountView, showingEditingControl: isShowingEditControl, indent: indentationLevel == 1, shouldShowDisclosure: isDisclosureAvailable, itemIsInFolder: itemIsInFolder) layoutWith(layout) if isDisclosureAvailable { titleView.font = .preferredFont(forTextStyle: .body).bold() @@ -165,7 +165,7 @@ protocol MasterFeedTableViewCellDelegate: AnyObject { @objc func buttonPressed(_ sender: UIButton) { if isDisclosureAvailable { setDisclosure(isExpanded: !isDisclosureExpanded, animated: true) - delegate?.masterFeedTableViewCellDisclosureDidToggle(self, expanding: isDisclosureExpanded) + delegate?.mainFeedTableViewCellDisclosureDidToggle(self, expanding: isDisclosureExpanded) } } @@ -198,7 +198,7 @@ protocol MasterFeedTableViewCellDelegate: AnyObject { } -private extension MasterFeedTableViewCell { +private extension MainFeedTableViewCell { func commonInit() { addSubviewAtInit(unreadCountView) @@ -224,7 +224,7 @@ private extension MasterFeedTableViewCell { view.translatesAutoresizingMaskIntoConstraints = false } - func layoutWith(_ layout: MasterFeedTableViewCellLayout) { + func layoutWith(_ layout: MainFeedTableViewCellLayout) { iconView.setFrameIfNotEqual(layout.faviconRect) titleView.setFrameIfNotEqual(layout.titleRect) unreadCountView.setFrameIfNotEqual(layout.unreadCountRect) diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewCellLayout.swift b/iOS/MainFeed/Cell/MainFeedTableViewCellLayout.swift similarity index 57% rename from iOS/MasterFeed/Cell/MasterFeedTableViewCellLayout.swift rename to iOS/MainFeed/Cell/MainFeedTableViewCellLayout.swift index 1f1e266fb..fd5d6ffcc 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewCellLayout.swift +++ b/iOS/MainFeed/Cell/MainFeedTableViewCellLayout.swift @@ -9,7 +9,7 @@ import UIKit import RSCore -@MainActor struct MasterFeedTableViewCellLayout { +@MainActor struct MainFeedTableViewCellLayout { private static let indentWidth = CGFloat(integerLiteral: 15) private static let editingControlIndent = CGFloat(integerLiteral: 40) @@ -32,18 +32,18 @@ import RSCore let height: CGFloat - init(cellWidth: CGFloat, insets: UIEdgeInsets, label: UILabel, unreadCountView: MasterFeedUnreadCountView, showingEditingControl: Bool, indent: Bool, shouldShowDisclosure: Bool, itemIsInFolder: Bool) { + init(cellWidth: CGFloat, insets: UIEdgeInsets, label: UILabel, unreadCountView: MainFeedUnreadCountView, showingEditingControl: Bool, indent: Bool, shouldShowDisclosure: Bool, itemIsInFolder: Bool) { var initialIndent = insets.left if indent { - initialIndent += MasterFeedTableViewCellLayout.indentWidth + initialIndent += MainFeedTableViewCellLayout.indentWidth } let bounds = CGRect(x: initialIndent, y: 0.0, width: floor(cellWidth - initialIndent - insets.right), height: 0.0) // Disclosure Button var rDisclosure = CGRect.zero if shouldShowDisclosure { - rDisclosure.size = MasterFeedTableViewCellLayout.disclosureButtonSize + rDisclosure.size = MainFeedTableViewCellLayout.disclosureButtonSize rDisclosure.origin.x = insets.left } @@ -51,13 +51,13 @@ import RSCore var rFavicon = CGRect.zero if !shouldShowDisclosure { let x = bounds.origin.x - let y = UIFontMetrics.default.scaledValue(for: MasterFeedTableViewCellLayout.verticalPadding) + + let y = UIFontMetrics.default.scaledValue(for: MainFeedTableViewCellLayout.verticalPadding) + label.font.lineHeight / 2.0 - - MasterFeedTableViewCellLayout.imageSize.height / 2.0 + MainFeedTableViewCellLayout.imageSize.height / 2.0 if itemIsInFolder { - rFavicon = CGRect(x: x + MasterFeedTableViewCellLayout.disclosureButtonSize.width - (MasterFeedTableViewCellLayout.imageSize.width / 2), y: y, width: MasterFeedTableViewCellLayout.imageSize.width, height: MasterFeedTableViewCellLayout.imageSize.height) + rFavicon = CGRect(x: x + MainFeedTableViewCellLayout.disclosureButtonSize.width - (MainFeedTableViewCellLayout.imageSize.width / 2), y: y, width: MainFeedTableViewCellLayout.imageSize.width, height: MainFeedTableViewCellLayout.imageSize.height) } else { - rFavicon = CGRect(x: x, y: y, width: MasterFeedTableViewCellLayout.imageSize.width, height: MasterFeedTableViewCellLayout.imageSize.height) + rFavicon = CGRect(x: x, y: y, width: MainFeedTableViewCellLayout.imageSize.width, height: MainFeedTableViewCellLayout.imageSize.height) } } @@ -69,21 +69,21 @@ import RSCore var rUnread = CGRect.zero if !unreadCountIsHidden { rUnread.size = unreadCountSize - rUnread.origin.x = bounds.maxX - (MasterFeedTableViewCellLayout.unreadCountMarginRight + unreadCountSize.width) + rUnread.origin.x = bounds.maxX - (MainFeedTableViewCellLayout.unreadCountMarginRight + unreadCountSize.width) } // Title - var rLabelx = MasterFeedTableViewCellLayout.disclosureButtonSize.width + insets.left + var rLabelx = MainFeedTableViewCellLayout.disclosureButtonSize.width + insets.left if itemIsInFolder { - rLabelx += MasterFeedTableViewCellLayout.disclosureButtonSize.width - (rFavicon.width / 2) + rLabelx += MainFeedTableViewCellLayout.disclosureButtonSize.width - (rFavicon.width / 2) } - let rLabely = UIFontMetrics.default.scaledValue(for: MasterFeedTableViewCellLayout.verticalPadding) + let rLabely = UIFontMetrics.default.scaledValue(for: MainFeedTableViewCellLayout.verticalPadding) var labelWidth = CGFloat.zero if !unreadCountIsHidden { - labelWidth = cellWidth - (rLabelx + MasterFeedTableViewCellLayout.labelMarginRight + (cellWidth - rUnread.minX)) + labelWidth = cellWidth - (rLabelx + MainFeedTableViewCellLayout.labelMarginRight + (cellWidth - rUnread.minX)) } else { - labelWidth = cellWidth - (rLabelx + MasterFeedTableViewCellLayout.labelMarginRight) + labelWidth = cellWidth - (rLabelx + MainFeedTableViewCellLayout.labelMarginRight) } let labelSizeInfo = MultilineUILabelSizer.size(for: label.text ?? "", font: label.font, numberOfLines: 0, width: Int(floor(labelWidth))) @@ -92,44 +92,44 @@ import RSCore // We do this because we don't want the row height to change when the editing controls are brought out. We will // handle the missing space, but removing it from the label and truncating. if showingEditingControl { - rDisclosure.origin.x += MasterFeedTableViewCellLayout.editingControlIndent - rFavicon.origin.x += MasterFeedTableViewCellLayout.editingControlIndent - rLabelx += MasterFeedTableViewCellLayout.editingControlIndent + rDisclosure.origin.x += MainFeedTableViewCellLayout.editingControlIndent + rFavicon.origin.x += MainFeedTableViewCellLayout.editingControlIndent + rLabelx += MainFeedTableViewCellLayout.editingControlIndent if !unreadCountIsHidden { - rUnread.origin.x -= MasterFeedTableViewCellLayout.editingControlIndent - labelWidth = cellWidth - (rLabelx + MasterFeedTableViewCellLayout.labelMarginRight + (cellWidth - rUnread.minX)) + rUnread.origin.x -= MainFeedTableViewCellLayout.editingControlIndent + labelWidth = cellWidth - (rLabelx + MainFeedTableViewCellLayout.labelMarginRight + (cellWidth - rUnread.minX)) } else { - labelWidth = cellWidth - (rLabelx + MasterFeedTableViewCellLayout.labelMarginRight + MasterFeedTableViewCellLayout.editingControlIndent) + labelWidth = cellWidth - (rLabelx + MainFeedTableViewCellLayout.labelMarginRight + MainFeedTableViewCellLayout.editingControlIndent) } } var rLabel = CGRect(x: rLabelx, y: rLabely, width: labelWidth, height: labelSizeInfo.size.height) // Determine cell height - let paddedLabelHeight = rLabel.maxY + UIFontMetrics.default.scaledValue(for: MasterFeedTableViewCellLayout.verticalPadding) + let paddedLabelHeight = rLabel.maxY + UIFontMetrics.default.scaledValue(for: MainFeedTableViewCellLayout.verticalPadding) let maxGraphicsHeight = [rFavicon, rUnread, rDisclosure].maxY() var cellHeight = max(paddedLabelHeight, maxGraphicsHeight) - if cellHeight < MasterFeedTableViewCellLayout.minRowHeight { - cellHeight = MasterFeedTableViewCellLayout.minRowHeight + if cellHeight < MainFeedTableViewCellLayout.minRowHeight { + cellHeight = MainFeedTableViewCellLayout.minRowHeight } // Center in Cell let newBounds = CGRect(x: bounds.origin.x, y: bounds.origin.y, width: bounds.width, height: cellHeight) if !unreadCountIsHidden { - rUnread = MasterFeedTableViewCellLayout.centerVertically(rUnread, newBounds) + rUnread = MainFeedTableViewCellLayout.centerVertically(rUnread, newBounds) } if shouldShowDisclosure { - rDisclosure = MasterFeedTableViewCellLayout.centerVertically(rDisclosure, newBounds) + rDisclosure = MainFeedTableViewCellLayout.centerVertically(rDisclosure, newBounds) } // Small fonts and the Favicon need centered if we hit the minimum row height - if cellHeight == MasterFeedTableViewCellLayout.minRowHeight { - rLabel = MasterFeedTableViewCellLayout.centerVertically(rLabel, newBounds) - rFavicon = MasterFeedTableViewCellLayout.centerVertically(rFavicon, newBounds) + if cellHeight == MainFeedTableViewCellLayout.minRowHeight { + rLabel = MainFeedTableViewCellLayout.centerVertically(rLabel, newBounds) + rFavicon = MainFeedTableViewCellLayout.centerVertically(rFavicon, newBounds) } // Separator Insets - let separatorInset = MasterFeedTableViewCellLayout.disclosureButtonSize.width + let separatorInset = MainFeedTableViewCellLayout.disclosureButtonSize.width separatorRect = CGRect(x: separatorInset, y: cellHeight - 0.5, width: cellWidth - separatorInset, height: 0.5) diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeaderLayout.swift b/iOS/MainFeed/Cell/MainFeedTableViewSectionHeaderLayout.swift similarity index 68% rename from iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeaderLayout.swift rename to iOS/MainFeed/Cell/MainFeedTableViewSectionHeaderLayout.swift index eeacff01f..adbe2c1ee 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeaderLayout.swift +++ b/iOS/MainFeed/Cell/MainFeedTableViewSectionHeaderLayout.swift @@ -9,7 +9,7 @@ import UIKit import RSCore -@MainActor struct MasterFeedTableViewSectionHeaderLayout { +@MainActor struct MainFeedTableViewSectionHeaderLayout { private static let labelMarginRight = CGFloat(integerLiteral: 8) private static let disclosureButtonSize = CGSize(width: 44, height: 44) @@ -28,35 +28,35 @@ import RSCore // Disclosure Button var rDisclosure = CGRect.zero - rDisclosure.size = MasterFeedTableViewSectionHeaderLayout.disclosureButtonSize + rDisclosure.size = MainFeedTableViewSectionHeaderLayout.disclosureButtonSize rDisclosure.origin.x = bounds.maxX - rDisclosure.size.width // Title let rLabelx = 15.0 - let rLabely = UIFontMetrics.default.scaledValue(for: MasterFeedTableViewSectionHeaderLayout.verticalPadding) + let rLabely = UIFontMetrics.default.scaledValue(for: MainFeedTableViewSectionHeaderLayout.verticalPadding) var labelWidth = CGFloat.zero - labelWidth = cellWidth - (rLabelx + MasterFeedTableViewSectionHeaderLayout.labelMarginRight) + labelWidth = cellWidth - (rLabelx + MainFeedTableViewSectionHeaderLayout.labelMarginRight) let labelSizeInfo = MultilineUILabelSizer.size(for: label.text ?? "", font: label.font, numberOfLines: 0, width: Int(floor(labelWidth))) var rLabel = CGRect(x: rLabelx, y: rLabely, width: labelWidth, height: labelSizeInfo.size.height) // Determine cell height - let paddedLabelHeight = rLabel.maxY + UIFontMetrics.default.scaledValue(for: MasterFeedTableViewSectionHeaderLayout.verticalPadding) + let paddedLabelHeight = rLabel.maxY + UIFontMetrics.default.scaledValue(for: MainFeedTableViewSectionHeaderLayout.verticalPadding) let maxGraphicsHeight = [rDisclosure].maxY() var cellHeight = max(paddedLabelHeight, maxGraphicsHeight) - if cellHeight < MasterFeedTableViewSectionHeaderLayout.minRowHeight { - cellHeight = MasterFeedTableViewSectionHeaderLayout.minRowHeight + if cellHeight < MainFeedTableViewSectionHeaderLayout.minRowHeight { + cellHeight = MainFeedTableViewSectionHeaderLayout.minRowHeight } // Center in Cell let newBounds = CGRect(x: bounds.origin.x, y: bounds.origin.y, width: bounds.width, height: cellHeight) - rDisclosure = MasterFeedTableViewCellLayout.centerVertically(rDisclosure, newBounds) + rDisclosure = MainFeedTableViewCellLayout.centerVertically(rDisclosure, newBounds) // Small fonts need centered if we hit the minimum row height - if cellHeight == MasterFeedTableViewSectionHeaderLayout.minRowHeight { - rLabel = MasterFeedTableViewCellLayout.centerVertically(rLabel, newBounds) + if cellHeight == MainFeedTableViewSectionHeaderLayout.minRowHeight { + rLabel = MainFeedTableViewCellLayout.centerVertically(rLabel, newBounds) } // Assign the properties diff --git a/iOS/MasterFeed/Cell/MasterFeedUnreadCountView.swift b/iOS/MainFeed/Cell/MainFeedUnreadCountView.swift similarity index 98% rename from iOS/MasterFeed/Cell/MasterFeedUnreadCountView.swift rename to iOS/MainFeed/Cell/MainFeedUnreadCountView.swift index ce2b7d912..def2ea59c 100644 --- a/iOS/MasterFeed/Cell/MasterFeedUnreadCountView.swift +++ b/iOS/MainFeed/Cell/MainFeedUnreadCountView.swift @@ -8,7 +8,7 @@ import UIKit -@MainActor class MasterFeedUnreadCountView : UIView { +@MainActor class MainFeedUnreadCountView : UIView { var padding: UIEdgeInsets { return UIEdgeInsets(top: 1.0, left: 9.0, bottom: 1.0, right: 9.0) diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewCellSectionIdentifier.swift b/iOS/MainFeed/Cell/MasterFeedTableViewCellSectionIdentifier.swift similarity index 100% rename from iOS/MasterFeed/Cell/MasterFeedTableViewCellSectionIdentifier.swift rename to iOS/MainFeed/Cell/MasterFeedTableViewCellSectionIdentifier.swift diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewIdentifier.swift b/iOS/MainFeed/Cell/MasterFeedTableViewIdentifier.swift similarity index 100% rename from iOS/MasterFeed/Cell/MasterFeedTableViewIdentifier.swift rename to iOS/MainFeed/Cell/MasterFeedTableViewIdentifier.swift diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift b/iOS/MainFeed/Cell/MasterFeedTableViewSectionHeader.swift similarity index 88% rename from iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift rename to iOS/MainFeed/Cell/MasterFeedTableViewSectionHeader.swift index a32c6a7ba..d8f0177e3 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift +++ b/iOS/MainFeed/Cell/MasterFeedTableViewSectionHeader.swift @@ -8,13 +8,13 @@ import UIKit -protocol MasterFeedTableViewSectionHeaderDelegate { - func masterFeedTableViewSectionHeaderDisclosureDidToggle(_ sender: MasterFeedTableViewSectionHeader) +protocol MainFeedTableViewSectionHeaderDelegate { + func mainFeedTableViewSectionHeaderDisclosureDidToggle(_ sender: MasterFeedTableViewSectionHeader) } @MainActor class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView { - var delegate: MasterFeedTableViewSectionHeaderDelegate? + var delegate: MainFeedTableViewSectionHeaderDelegate? override var accessibilityLabel: String? { set {} @@ -95,14 +95,14 @@ protocol MasterFeedTableViewSectionHeaderDelegate { } override func sizeThatFits(_ size: CGSize) -> CGSize { - let layout = MasterFeedTableViewSectionHeaderLayout(cellWidth: size.width, insets: safeAreaInsets, label: titleView) + let layout = MainFeedTableViewSectionHeaderLayout(cellWidth: size.width, insets: safeAreaInsets, label: titleView) return CGSize(width: bounds.width, height: layout.height) } override func layoutSubviews() { super.layoutSubviews() - let layout = MasterFeedTableViewSectionHeaderLayout(cellWidth: contentView.bounds.size.width, + let layout = MainFeedTableViewSectionHeaderLayout(cellWidth: contentView.bounds.size.width, insets: contentView.safeAreaInsets, label: titleView) layoutWith(layout) @@ -113,7 +113,7 @@ protocol MasterFeedTableViewSectionHeaderDelegate { private extension MasterFeedTableViewSectionHeader { @objc func toggleDisclosure() { - delegate?.masterFeedTableViewSectionHeaderDisclosureDidToggle(self) + delegate?.mainFeedTableViewSectionHeaderDisclosureDidToggle(self) } func commonInit() { @@ -152,7 +152,7 @@ private extension MasterFeedTableViewSectionHeader { view.translatesAutoresizingMaskIntoConstraints = false } - func layoutWith(_ layout: MasterFeedTableViewSectionHeaderLayout) { + func layoutWith(_ layout: MainFeedTableViewSectionHeaderLayout) { titleView.setFrameIfNotEqual(layout.titleRect) disclosureButton.setFrameIfNotEqual(layout.disclosureButtonRect) diff --git a/iOS/MasterFeed/MasterFeedViewController+Drag.swift b/iOS/MainFeed/MainFeedViewController+Drag.swift similarity index 93% rename from iOS/MasterFeed/MasterFeedViewController+Drag.swift rename to iOS/MainFeed/MainFeedViewController+Drag.swift index edd63ac34..e2a8c681f 100644 --- a/iOS/MasterFeed/MasterFeedViewController+Drag.swift +++ b/iOS/MainFeed/MainFeedViewController+Drag.swift @@ -11,7 +11,7 @@ import MobileCoreServices import Account import UniformTypeIdentifiers -extension MasterFeedViewController: UITableViewDragDelegate { +extension MainFeedViewController: UITableViewDragDelegate { func tableView(_ tableView: UITableView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath) -> [UIDragItem] { guard let node = coordinator.nodeFor(indexPath), let feed = node.representedObject as? Feed else { diff --git a/iOS/MasterFeed/MasterFeedViewController+Drop.swift b/iOS/MainFeed/MainFeedViewController+Drop.swift similarity index 98% rename from iOS/MasterFeed/MasterFeedViewController+Drop.swift rename to iOS/MainFeed/MainFeedViewController+Drop.swift index 1fd5c48af..1acbfb282 100644 --- a/iOS/MasterFeed/MasterFeedViewController+Drop.swift +++ b/iOS/MainFeed/MainFeedViewController+Drop.swift @@ -11,7 +11,7 @@ import RSCore import Account import RSTree -extension MasterFeedViewController: UITableViewDropDelegate { +extension MainFeedViewController: UITableViewDropDelegate { func tableView(_ tableView: UITableView, canHandle session: UIDropSession) -> Bool { return session.localDragSession != nil @@ -125,7 +125,7 @@ extension MasterFeedViewController: UITableViewDropDelegate { } -private extension MasterFeedViewController { +private extension MainFeedViewController { func correctDestinationIndexPath(session: UIDropSession) -> IndexPath? { let location = session.location(in: tableView) diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MainFeed/MainFeedViewController.swift similarity index 96% rename from iOS/MasterFeed/MasterFeedViewController.swift rename to iOS/MainFeed/MainFeedViewController.swift index 76096d3d0..fce70ffc1 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MainFeed/MainFeedViewController.swift @@ -15,7 +15,7 @@ import RSCore import RSTree import SafariServices -class MasterFeedViewController: UITableViewController, UndoableCommandRunner, MainControllerIdentifiable { +class MainFeedViewController: UITableViewController, UndoableCommandRunner, MainControllerIdentifiable { @IBOutlet weak var filterButton: UIBarButtonItem! @IBOutlet weak var addNewItemButton: UIBarButtonItem! { @@ -27,8 +27,8 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma let refreshProgressModel = RefreshProgressModel() lazy var progressBarViewController = UIHostingController(rootView: RefreshProgressView(progressBarMode: refreshProgressModel)) - var mainControllerIdentifier = MainControllerIdentifier.masterFeed - + var mainControllerIdentifier = MainControllerIdentifier.mainFeed + weak var coordinator: SceneCoordinator! var undoableCommands = [UndoableCommand]() @@ -134,7 +134,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma node = coordinator.rootNode.descendantNodeRepresentingObject(unreadCountProvider as AnyObject) guard let unreadCountNode = node, let indexPath = coordinator.indexPathFor(unreadCountNode) else { return } - if let cell = tableView.cellForRow(at: indexPath) as? MasterFeedTableViewCell { + if let cell = tableView.cellForRow(at: indexPath) as? MainFeedTableViewCell { cell.unreadCount = unreadCountProvider.unreadCount } } @@ -186,7 +186,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MasterFeedTableViewCell + let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MainFeedTableViewCell configure(cell, indexPath) return cell } @@ -352,7 +352,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma } override func tableView(_ tableView: UITableView, previewForHighlightingContextMenuWithConfiguration configuration: UIContextMenuConfiguration) -> UITargetedPreview? { - guard let identifier = configuration.identifier as? MasterFeedRowIdentifier, + guard let identifier = configuration.identifier as? MainFeedRowIdentifier, let cell = tableView.cellForRow(at: identifier.indexPath) else { return nil } @@ -531,7 +531,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma // MARK: API func restoreSelectionIfNecessary(adjustScroll: Bool) { - if let indexPath = coordinator.masterFeedIndexPathForCurrentTimeline() { + if let indexPath = coordinator.mainFeedIndexPathForCurrentTimeline() { if adjustScroll { tableView.selectRowAndScrollIfNotVisible(at: indexPath, animations: []) } else { @@ -718,7 +718,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner, Ma // MARK: UIContextMenuInteractionDelegate -extension MasterFeedViewController: UIContextMenuInteractionDelegate { +extension MainFeedViewController: UIContextMenuInteractionDelegate { func contextMenuInteraction(_ interaction: UIContextMenuInteraction, configurationForMenuAtLocation location: CGPoint) -> UIContextMenuConfiguration? { guard let sectionIndex = interaction.view?.tag, @@ -759,9 +759,9 @@ extension MasterFeedViewController: UIContextMenuInteractionDelegate { // MARK: MasterFeedTableViewSectionHeaderDelegate -extension MasterFeedViewController: MasterFeedTableViewSectionHeaderDelegate { +extension MainFeedViewController: MainFeedTableViewSectionHeaderDelegate { - func masterFeedTableViewSectionHeaderDisclosureDidToggle(_ sender: MasterFeedTableViewSectionHeader) { + func mainFeedTableViewSectionHeaderDisclosureDidToggle(_ sender: MasterFeedTableViewSectionHeader) { toggle(sender) } @@ -769,9 +769,9 @@ extension MasterFeedViewController: MasterFeedTableViewSectionHeaderDelegate { // MARK: MasterTableViewCellDelegate -extension MasterFeedViewController: MasterFeedTableViewCellDelegate { +extension MainFeedViewController: MainFeedTableViewCellDelegate { - func masterFeedTableViewCellDisclosureDidToggle(_ sender: MasterFeedTableViewCell, expanding: Bool) { + func mainFeedTableViewCellDisclosureDidToggle(_ sender: MainFeedTableViewCell, expanding: Bool) { if expanding { expand(sender) } else { @@ -783,7 +783,7 @@ extension MasterFeedViewController: MasterFeedTableViewCellDelegate { // MARK: Private -private extension MasterFeedViewController { +private extension MainFeedViewController { func setFilterButtonToActive() { filterButton?.image = AppAssets.filterActiveImage @@ -799,14 +799,14 @@ private extension MasterFeedViewController { let titleLabel = NonIntrinsicLabel() titleLabel.text = "But I must explain" - let unreadCountView = MasterFeedUnreadCountView() + let unreadCountView = MainFeedUnreadCountView() unreadCountView.unreadCount = 10 - let layout = MasterFeedTableViewCellLayout(cellWidth: tableView.bounds.size.width, insets: tableView.safeAreaInsets, label: titleLabel, unreadCountView: unreadCountView, showingEditingControl: false, indent: false, shouldShowDisclosure: false, itemIsInFolder: false) + let layout = MainFeedTableViewCellLayout(cellWidth: tableView.bounds.size.width, insets: tableView.safeAreaInsets, label: titleLabel, unreadCountView: unreadCountView, showingEditingControl: false, indent: false, shouldShowDisclosure: false, itemIsInFolder: false) tableView.estimatedRowHeight = layout.height } - func configure(_ cell: MasterFeedTableViewCell, _ indexPath: IndexPath) { + func configure(_ cell: MainFeedTableViewCell, _ indexPath: IndexPath) { guard let node = coordinator.nodeFor(indexPath) else { return } cell.delegate = self @@ -849,7 +849,7 @@ private extension MasterFeedViewController { } - func configureIcon(_ cell: MasterFeedTableViewCell, _ indexPath: IndexPath) { + func configureIcon(_ cell: MainFeedTableViewCell, _ indexPath: IndexPath) { guard let node = coordinator.nodeFor(indexPath), let feed = node.representedObject as? FeedProtocol, let feedID = feed.itemID else { return } @@ -867,7 +867,7 @@ private extension MasterFeedViewController { applyToCellsForRepresentedObject(representedObject, configure) } - func applyToCellsForRepresentedObject(_ representedObject: AnyObject, _ completion: (MasterFeedTableViewCell, IndexPath) -> Void) { + func applyToCellsForRepresentedObject(_ representedObject: AnyObject, _ completion: (MainFeedTableViewCell, IndexPath) -> Void) { applyToAvailableCells { (cell, indexPath) in if let node = coordinator.nodeFor(indexPath), let representedFeed = representedObject as? FeedProtocol, @@ -878,12 +878,12 @@ private extension MasterFeedViewController { } } - func applyToAvailableCells(_ completion: (MasterFeedTableViewCell, IndexPath) -> Void) { + func applyToAvailableCells(_ completion: (MainFeedTableViewCell, IndexPath) -> Void) { for cell in tableView.visibleCells { guard let indexPath = tableView.indexPath(for: cell) else { continue } - completion(cell as! MasterFeedTableViewCell, indexPath) + completion(cell as! MainFeedTableViewCell, indexPath) } } @@ -926,14 +926,14 @@ private extension MasterFeedViewController { } } - func expand(_ cell: MasterFeedTableViewCell) { + func expand(_ cell: MainFeedTableViewCell) { guard let indexPath = tableView.indexPath(for: cell), let node = coordinator.nodeFor(indexPath) else { return } coordinator.expand(node) } - func collapse(_ cell: MasterFeedTableViewCell) { + func collapse(_ cell: MainFeedTableViewCell) { guard let indexPath = tableView.indexPath(for: cell), let node = coordinator.nodeFor(indexPath) else { return } @@ -941,7 +941,7 @@ private extension MasterFeedViewController { } func makeFeedContextMenu(indexPath: IndexPath, includeDeleteRename: Bool) -> UIContextMenuConfiguration { - return UIContextMenuConfiguration(identifier: MasterFeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { [ weak self] suggestedActions in + return UIContextMenuConfiguration(identifier: MainFeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { [ weak self] suggestedActions in guard let self = self else { return nil } @@ -991,7 +991,7 @@ private extension MasterFeedViewController { } func makeFolderContextMenu(indexPath: IndexPath) -> UIContextMenuConfiguration { - return UIContextMenuConfiguration(identifier: MasterFeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { [weak self] suggestedActions in + return UIContextMenuConfiguration(identifier: MainFeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { [weak self] suggestedActions in guard let self = self else { return nil } @@ -1018,7 +1018,7 @@ private extension MasterFeedViewController { } func makePseudoFeedContextMenu(indexPath: IndexPath) -> UIContextMenuConfiguration { - return UIContextMenuConfiguration(identifier: MasterFeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { [weak self] suggestedActions in + return UIContextMenuConfiguration(identifier: MainFeedRowIdentifier(indexPath: indexPath), previewProvider: nil, actionProvider: { [weak self] suggestedActions in guard let self = self else { return nil } @@ -1527,7 +1527,7 @@ private extension MasterFeedViewController { } -extension MasterFeedViewController: UIGestureRecognizerDelegate { +extension MainFeedViewController: UIGestureRecognizerDelegate { func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { guard let gestureRecognizer = gestureRecognizer as? UIPanGestureRecognizer else { return false diff --git a/iOS/MasterFeed/RefreshProgressView.swift b/iOS/MainFeed/RefreshProgressView.swift similarity index 100% rename from iOS/MasterFeed/RefreshProgressView.swift rename to iOS/MainFeed/RefreshProgressView.swift diff --git a/iOS/MasterFeed/ShadowTableChanges.swift b/iOS/MainFeed/ShadowTableChanges.swift similarity index 100% rename from iOS/MasterFeed/ShadowTableChanges.swift rename to iOS/MainFeed/ShadowTableChanges.swift diff --git a/iOS/MasterFeed/UpdateSelectionOperation.swift b/iOS/MainFeed/UpdateSelectionOperation.swift similarity index 100% rename from iOS/MasterFeed/UpdateSelectionOperation.swift rename to iOS/MainFeed/UpdateSelectionOperation.swift diff --git a/iOS/MasterTimeline/Base.lproj/MasterTimelineTitleView.xib b/iOS/MainTimeline/Base.lproj/MainTimelineTitleView.xib similarity index 93% rename from iOS/MasterTimeline/Base.lproj/MasterTimelineTitleView.xib rename to iOS/MainTimeline/Base.lproj/MainTimelineTitleView.xib index 7d5b53ce6..06e135fe3 100644 --- a/iOS/MasterTimeline/Base.lproj/MasterTimelineTitleView.xib +++ b/iOS/MainTimeline/Base.lproj/MainTimelineTitleView.xib @@ -1,15 +1,16 @@ - + - + + - + @@ -19,7 +20,7 @@ - + @@ -32,6 +33,7 @@ + @@ -45,7 +47,6 @@ - diff --git a/iOS/MainTimeline/Cell/MainTimelineAccessibilityCellLayout.swift b/iOS/MainTimeline/Cell/MainTimelineAccessibilityCellLayout.swift new file mode 100644 index 000000000..2304ac775 --- /dev/null +++ b/iOS/MainTimeline/Cell/MainTimelineAccessibilityCellLayout.swift @@ -0,0 +1,90 @@ +// +// MainTimelineAccessibilityCellLayout.swift +// NetNewsWire-iOS +// +// Created by Maurice Parker on 4/29/19. +// Copyright © 2019 Ranchero Software. All rights reserved. +// + +import UIKit +import RSCore + +@MainActor struct MainTimelineAccessibilityCellLayout: MainTimelineCellLayout { + + let height: CGFloat + let unreadIndicatorRect: CGRect + let starRect: CGRect + let iconImageRect: CGRect + let titleRect: CGRect + let summaryRect: CGRect + let feedNameRect: CGRect + let dateRect: CGRect + + init(width: CGFloat, insets: UIEdgeInsets, cellData: MainTimelineCellData) { + + var currentPoint = CGPoint.zero + currentPoint.x = MainTimelineDefaultCellLayout.cellPadding.left + insets.left + MainTimelineDefaultCellLayout.unreadCircleMarginLeft + currentPoint.y = MainTimelineDefaultCellLayout.cellPadding.top + + // Unread Indicator and Star + self.unreadIndicatorRect = MainTimelineAccessibilityCellLayout.rectForUnreadIndicator(currentPoint) + self.starRect = MainTimelineAccessibilityCellLayout.rectForStar(currentPoint) + + // Start the point at the beginning position of the main block + currentPoint.x += MainTimelineDefaultCellLayout.unreadCircleDimension + MainTimelineDefaultCellLayout.unreadCircleMarginRight + + // Icon Image + if cellData.showIcon { + self.iconImageRect = MainTimelineAccessibilityCellLayout.rectForIconView(currentPoint, iconSize: cellData.iconSize) + currentPoint.y = self.iconImageRect.maxY + } else { + self.iconImageRect = CGRect.zero + } + + let textAreaWidth = width - (currentPoint.x + MainTimelineDefaultCellLayout.cellPadding.right + insets.right) + + // Title Text Block + let (titleRect, numberOfLinesForTitle) = MainTimelineAccessibilityCellLayout.rectForTitle(cellData, currentPoint, textAreaWidth) + self.titleRect = titleRect + + // Summary Text Block + if self.titleRect != CGRect.zero { + currentPoint.y = self.titleRect.maxY + MainTimelineDefaultCellLayout.titleBottomMargin + } + self.summaryRect = MainTimelineAccessibilityCellLayout.rectForSummary(cellData, currentPoint, textAreaWidth, numberOfLinesForTitle) + + currentPoint.y = [self.titleRect, self.summaryRect].maxY() + + if cellData.showFeedName != .none { + self.feedNameRect = MainTimelineAccessibilityCellLayout.rectForFeedName(cellData, currentPoint, textAreaWidth) + currentPoint.y = self.feedNameRect.maxY + } else { + self.feedNameRect = CGRect.zero + } + + // Feed Name and Pub Date + self.dateRect = MainTimelineAccessibilityCellLayout.rectForDate(cellData, currentPoint, textAreaWidth) + + self.height = self.dateRect.maxY + MainTimelineDefaultCellLayout.cellPadding.bottom + + } + +} + +// MARK: - Calculate Rects + +private extension MainTimelineAccessibilityCellLayout { + + static func rectForDate(_ cellData: MainTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { + + var r = CGRect.zero + + let size = SingleLineUILabelSizer.size(for: cellData.dateString, font: MainTimelineDefaultCellLayout.dateFont) + r.size = size + r.origin = point + + return r + + } + +} diff --git a/iOS/MasterTimeline/Cell/MasterTimelineCellData.swift b/iOS/MainTimeline/Cell/MainTimelineCellData.swift similarity index 98% rename from iOS/MasterTimeline/Cell/MasterTimelineCellData.swift rename to iOS/MainTimeline/Cell/MainTimelineCellData.swift index b5711e1e2..42bd3ce3b 100644 --- a/iOS/MasterTimeline/Cell/MasterTimelineCellData.swift +++ b/iOS/MainTimeline/Cell/MainTimelineCellData.swift @@ -9,7 +9,7 @@ import UIKit import Articles -@MainActor struct MasterTimelineCellData { +@MainActor struct MainTimelineCellData { private static let noText = NSLocalizedString("label.text.no-text", comment: "(No Text)") diff --git a/iOS/MasterTimeline/Cell/MasterTimelineCellLayout.swift b/iOS/MainTimeline/Cell/MainTimelineCellLayout.swift similarity index 61% rename from iOS/MasterTimeline/Cell/MasterTimelineCellLayout.swift rename to iOS/MainTimeline/Cell/MainTimelineCellLayout.swift index 44191a49d..398edd343 100644 --- a/iOS/MasterTimeline/Cell/MasterTimelineCellLayout.swift +++ b/iOS/MainTimeline/Cell/MainTimelineCellLayout.swift @@ -1,5 +1,5 @@ // -// MasterTimelineCellLayout.swift +// MainTimelineCellLayoutswift // NetNewsWire-iOS // // Created by Maurice Parker on 4/29/19. @@ -8,7 +8,7 @@ import UIKit -protocol MasterTimelineCellLayout { +protocol MainTimelineCellLayout { var height: CGFloat {get} var unreadIndicatorRect: CGRect {get} @@ -21,11 +21,11 @@ protocol MasterTimelineCellLayout { } -@MainActor extension MasterTimelineCellLayout { +@MainActor extension MainTimelineCellLayout { static func rectForUnreadIndicator(_ point: CGPoint) -> CGRect { var r = CGRect.zero - r.size = CGSize(width: MasterTimelineDefaultCellLayout.unreadCircleDimension, height: MasterTimelineDefaultCellLayout.unreadCircleDimension) + r.size = CGSize(width: MainTimelineDefaultCellLayout.unreadCircleDimension, height: MainTimelineDefaultCellLayout.unreadCircleDimension) r.origin.x = point.x r.origin.y = point.y + 5 return r @@ -34,9 +34,9 @@ protocol MasterTimelineCellLayout { static func rectForStar(_ point: CGPoint) -> CGRect { var r = CGRect.zero - r.size.width = MasterTimelineDefaultCellLayout.starDimension - r.size.height = MasterTimelineDefaultCellLayout.starDimension - r.origin.x = floor(point.x - ((MasterTimelineDefaultCellLayout.starDimension - MasterTimelineDefaultCellLayout.unreadCircleDimension) / 2.0)) + r.size.width = MainTimelineDefaultCellLayout.starDimension + r.size.height = MainTimelineDefaultCellLayout.starDimension + r.origin.x = floor(point.x - ((MainTimelineDefaultCellLayout.starDimension - MainTimelineDefaultCellLayout.unreadCircleDimension) / 2.0)) r.origin.y = point.y + 3 return r } @@ -49,7 +49,7 @@ protocol MasterTimelineCellLayout { return r } - static func rectForTitle(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> (CGRect, Int) { + static func rectForTitle(_ cellData: MainTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> (CGRect, Int) { var r = CGRect.zero if cellData.title.isEmpty { @@ -58,7 +58,7 @@ protocol MasterTimelineCellLayout { r.origin = point - let sizeInfo = MultilineUILabelSizer.size(for: cellData.title, font: MasterTimelineDefaultCellLayout.titleFont, numberOfLines: cellData.numberOfLines, width: Int(textAreaWidth)) + let sizeInfo = MultilineUILabelSizer.size(for: cellData.title, font: MainTimelineDefaultCellLayout.titleFont, numberOfLines: cellData.numberOfLines, width: Int(textAreaWidth)) r.size.width = textAreaWidth r.size.height = sizeInfo.size.height @@ -70,7 +70,7 @@ protocol MasterTimelineCellLayout { } - static func rectForSummary(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat, _ linesUsed: Int) -> CGRect { + static func rectForSummary(_ cellData: MainTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat, _ linesUsed: Int) -> CGRect { let linesLeft = cellData.numberOfLines - linesUsed @@ -81,7 +81,7 @@ protocol MasterTimelineCellLayout { r.origin = point - let sizeInfo = MultilineUILabelSizer.size(for: cellData.summary, font: MasterTimelineDefaultCellLayout.summaryFont, numberOfLines: linesLeft, width: Int(textAreaWidth)) + let sizeInfo = MultilineUILabelSizer.size(for: cellData.summary, font: MainTimelineDefaultCellLayout.summaryFont, numberOfLines: linesLeft, width: Int(textAreaWidth)) r.size.width = textAreaWidth r.size.height = sizeInfo.size.height @@ -93,13 +93,13 @@ protocol MasterTimelineCellLayout { } - static func rectForFeedName(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { + static func rectForFeedName(_ cellData: MainTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { var r = CGRect.zero r.origin = point let feedName = cellData.showFeedName == .feed ? cellData.feedName : cellData.byline - let size = SingleLineUILabelSizer.size(for: feedName, font: MasterTimelineDefaultCellLayout.feedNameFont) + let size = SingleLineUILabelSizer.size(for: feedName, font: MainTimelineDefaultCellLayout.feedNameFont) r.size = size if r.size.width > textAreaWidth { diff --git a/iOS/MasterTimeline/Cell/MasterTimelineDefaultCellLayout.swift b/iOS/MainTimeline/Cell/MainTimelineDefaultCellLayout.swift similarity index 50% rename from iOS/MasterTimeline/Cell/MasterTimelineDefaultCellLayout.swift rename to iOS/MainTimeline/Cell/MainTimelineDefaultCellLayout.swift index 85cf66048..16255233a 100644 --- a/iOS/MasterTimeline/Cell/MasterTimelineDefaultCellLayout.swift +++ b/iOS/MainTimeline/Cell/MainTimelineDefaultCellLayout.swift @@ -9,17 +9,17 @@ import UIKit import RSCore -@MainActor struct MasterTimelineDefaultCellLayout: MasterTimelineCellLayout { +@MainActor struct MainTimelineDefaultCellLayout: MainTimelineCellLayout { static let cellPadding = UIEdgeInsets(top: 12, left: 8, bottom: 12, right: 20) static let unreadCircleMarginLeft = CGFloat(integerLiteral: 0) static let unreadCircleDimension = CGFloat(integerLiteral: 12) - static let unreadCircleSize = CGSize(width: MasterTimelineDefaultCellLayout.unreadCircleDimension, height: MasterTimelineDefaultCellLayout.unreadCircleDimension) + static let unreadCircleSize = CGSize(width: MainTimelineDefaultCellLayout.unreadCircleDimension, height: MainTimelineDefaultCellLayout.unreadCircleDimension) static let unreadCircleMarginRight = CGFloat(integerLiteral: 8) static let starDimension = CGFloat(integerLiteral: 16) - static let starSize = CGSize(width: MasterTimelineDefaultCellLayout.starDimension, height: MasterTimelineDefaultCellLayout.starDimension) + static let starSize = CGSize(width: MainTimelineDefaultCellLayout.starDimension, height: MainTimelineDefaultCellLayout.starDimension) static let iconMarginRight = CGFloat(integerLiteral: 8) static let iconCornerRadius = CGFloat(integerLiteral: 4) @@ -52,55 +52,55 @@ import RSCore let feedNameRect: CGRect let dateRect: CGRect - init(width: CGFloat, insets: UIEdgeInsets, cellData: MasterTimelineCellData) { + init(width: CGFloat, insets: UIEdgeInsets, cellData: MainTimelineCellData) { var currentPoint = CGPoint.zero - currentPoint.x = MasterTimelineDefaultCellLayout.cellPadding.left + insets.left + MasterTimelineDefaultCellLayout.unreadCircleMarginLeft - currentPoint.y = MasterTimelineDefaultCellLayout.cellPadding.top + currentPoint.x = MainTimelineDefaultCellLayout.cellPadding.left + insets.left + MainTimelineDefaultCellLayout.unreadCircleMarginLeft + currentPoint.y = MainTimelineDefaultCellLayout.cellPadding.top // Unread Indicator and Star - self.unreadIndicatorRect = MasterTimelineDefaultCellLayout.rectForUnreadIndicator(currentPoint) - self.starRect = MasterTimelineDefaultCellLayout.rectForStar(currentPoint) + self.unreadIndicatorRect = MainTimelineDefaultCellLayout.rectForUnreadIndicator(currentPoint) + self.starRect = MainTimelineDefaultCellLayout.rectForStar(currentPoint) // Start the point at the beginning position of the main block - currentPoint.x += MasterTimelineDefaultCellLayout.unreadCircleDimension + MasterTimelineDefaultCellLayout.unreadCircleMarginRight + currentPoint.x += MainTimelineDefaultCellLayout.unreadCircleDimension + MainTimelineDefaultCellLayout.unreadCircleMarginRight // Icon Image if cellData.showIcon { - self.iconImageRect = MasterTimelineDefaultCellLayout.rectForIconView(currentPoint, iconSize: cellData.iconSize) - currentPoint.x = self.iconImageRect.maxX + MasterTimelineDefaultCellLayout.iconMarginRight + self.iconImageRect = MainTimelineDefaultCellLayout.rectForIconView(currentPoint, iconSize: cellData.iconSize) + currentPoint.x = self.iconImageRect.maxX + MainTimelineDefaultCellLayout.iconMarginRight } else { self.iconImageRect = CGRect.zero } - let textAreaWidth = width - (currentPoint.x + MasterTimelineDefaultCellLayout.cellPadding.right + insets.right) + let textAreaWidth = width - (currentPoint.x + MainTimelineDefaultCellLayout.cellPadding.right + insets.right) // Title Text Block - let (titleRect, numberOfLinesForTitle) = MasterTimelineDefaultCellLayout.rectForTitle(cellData, currentPoint, textAreaWidth) + let (titleRect, numberOfLinesForTitle) = MainTimelineDefaultCellLayout.rectForTitle(cellData, currentPoint, textAreaWidth) self.titleRect = titleRect // Summary Text Block if self.titleRect != CGRect.zero { - currentPoint.y = self.titleRect.maxY + MasterTimelineDefaultCellLayout.titleBottomMargin + currentPoint.y = self.titleRect.maxY + MainTimelineDefaultCellLayout.titleBottomMargin } - self.summaryRect = MasterTimelineDefaultCellLayout.rectForSummary(cellData, currentPoint, textAreaWidth, numberOfLinesForTitle) + self.summaryRect = MainTimelineDefaultCellLayout.rectForSummary(cellData, currentPoint, textAreaWidth, numberOfLinesForTitle) var y = [self.titleRect, self.summaryRect].maxY() if y == 0 { y = iconImageRect.origin.y + iconImageRect.height // Necessary calculation of either feed name or date since we are working with dynamic font-sizes - let tmp = MasterTimelineDefaultCellLayout.rectForDate(cellData, currentPoint, textAreaWidth) + let tmp = MainTimelineDefaultCellLayout.rectForDate(cellData, currentPoint, textAreaWidth) y -= tmp.height } currentPoint.y = y // Feed Name and Pub Date - self.dateRect = MasterTimelineDefaultCellLayout.rectForDate(cellData, currentPoint, textAreaWidth) + self.dateRect = MainTimelineDefaultCellLayout.rectForDate(cellData, currentPoint, textAreaWidth) - let feedNameWidth = textAreaWidth - (MasterTimelineDefaultCellLayout.feedRightMargin + self.dateRect.size.width) - self.feedNameRect = MasterTimelineDefaultCellLayout.rectForFeedName(cellData, currentPoint, feedNameWidth) + let feedNameWidth = textAreaWidth - (MainTimelineDefaultCellLayout.feedRightMargin + self.dateRect.size.width) + self.feedNameRect = MainTimelineDefaultCellLayout.rectForFeedName(cellData, currentPoint, feedNameWidth) - self.height = [self.iconImageRect, self.feedNameRect].maxY() + MasterTimelineDefaultCellLayout.cellPadding.bottom + self.height = [self.iconImageRect, self.feedNameRect].maxY() + MainTimelineDefaultCellLayout.cellPadding.bottom } @@ -108,13 +108,13 @@ import RSCore // MARK: - Calculate Rects -extension MasterTimelineDefaultCellLayout { +extension MainTimelineDefaultCellLayout { - static func rectForDate(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { + static func rectForDate(_ cellData: MainTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { var r = CGRect.zero - let size = SingleLineUILabelSizer.size(for: cellData.dateString, font: MasterTimelineDefaultCellLayout.dateFont) + let size = SingleLineUILabelSizer.size(for: cellData.dateString, font: MainTimelineDefaultCellLayout.dateFont) r.size = size r.origin.x = (point.x + textAreaWidth) - size.width r.origin.y = point.y diff --git a/iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift b/iOS/MainTimeline/Cell/MainTimelineTableViewCell.swift similarity index 87% rename from iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift rename to iOS/MainTimeline/Cell/MainTimelineTableViewCell.swift index 23ddbbc72..bf6984fb0 100644 --- a/iOS/MasterTimeline/Cell/MasterTimelineTableViewCell.swift +++ b/iOS/MainTimeline/Cell/MainTimelineTableViewCell.swift @@ -9,13 +9,13 @@ import UIKit import RSCore -@MainActor class MasterTimelineTableViewCell: VibrantTableViewCell { +@MainActor class MainTimelineTableViewCell: VibrantTableViewCell { - private let titleView = MasterTimelineTableViewCell.multiLineUILabel() - private let summaryView = MasterTimelineTableViewCell.multiLineUILabel() - private let unreadIndicatorView = MasterUnreadIndicatorView(frame: CGRect.zero) - private let dateView = MasterTimelineTableViewCell.singleLineUILabel() - private let feedNameView = MasterTimelineTableViewCell.singleLineUILabel() + private let titleView = MainTimelineTableViewCell.multiLineUILabel() + private let summaryView = MainTimelineTableViewCell.multiLineUILabel() + private let unreadIndicatorView = MainUnreadIndicatorView(frame: CGRect.zero) + private let dateView = MainTimelineTableViewCell.singleLineUILabel() + private let feedNameView = MainTimelineTableViewCell.singleLineUILabel() private lazy var iconView = IconView() @@ -26,7 +26,7 @@ import RSCore private var unreadIndicatorPropertyAnimator: UIViewPropertyAnimator? private var starViewPropertyAnimator: UIViewPropertyAnimator? - var cellData: MasterTimelineCellData! { + var cellData: MainTimelineCellData! { didSet { updateSubviews() } @@ -103,7 +103,7 @@ import RSCore // MARK: - Private -private extension MasterTimelineTableViewCell { +private extension MainTimelineTableViewCell { static func singleLineUILabel() -> UILabel { let label = NonIntrinsicLabel() @@ -150,28 +150,28 @@ private extension MasterTimelineTableViewCell { addSubviewAtInit(starView, hidden: true) } - func updatedLayout(width: CGFloat) -> MasterTimelineCellLayout { + func updatedLayout(width: CGFloat) -> MainTimelineCellLayout { if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory { - return MasterTimelineAccessibilityCellLayout(width: width, insets: safeAreaInsets, cellData: cellData) + return MainTimelineAccessibilityCellLayout(width: width, insets: safeAreaInsets, cellData: cellData) } else { - return MasterTimelineDefaultCellLayout(width: width, insets: safeAreaInsets, cellData: cellData) + return MainTimelineDefaultCellLayout(width: width, insets: safeAreaInsets, cellData: cellData) } } func updateTitleView() { - titleView.font = MasterTimelineDefaultCellLayout.titleFont + titleView.font = MainTimelineDefaultCellLayout.titleFont titleView.textColor = labelColor updateTextFieldAttributedText(titleView, cellData?.attributedTitle) } func updateSummaryView() { - summaryView.font = MasterTimelineDefaultCellLayout.summaryFont + summaryView.font = MainTimelineDefaultCellLayout.summaryFont summaryView.textColor = labelColor updateTextFieldText(summaryView, cellData?.summary) } func updateDateView() { - dateView.font = MasterTimelineDefaultCellLayout.dateFont + dateView.font = MainTimelineDefaultCellLayout.dateFont dateView.textColor = secondaryLabelColor updateTextFieldText(dateView, cellData.dateString) } @@ -201,12 +201,12 @@ private extension MasterTimelineTableViewCell { switch cellData.showFeedName { case .feed: showView(feedNameView) - feedNameView.font = MasterTimelineDefaultCellLayout.feedNameFont + feedNameView.font = MainTimelineDefaultCellLayout.feedNameFont feedNameView.textColor = secondaryLabelColor updateTextFieldText(feedNameView, cellData.feedName) case .byline: showView(feedNameView) - feedNameView.font = MasterTimelineDefaultCellLayout.feedNameFont + feedNameView.font = MainTimelineDefaultCellLayout.feedNameFont feedNameView.textColor = secondaryLabelColor updateTextFieldText(feedNameView, cellData.byline) case .none: diff --git a/iOS/MasterTimeline/Cell/MasterUnreadIndicatorView.swift b/iOS/MainTimeline/Cell/MainUnreadIndicatorView.swift similarity index 85% rename from iOS/MasterTimeline/Cell/MasterUnreadIndicatorView.swift rename to iOS/MainTimeline/Cell/MainUnreadIndicatorView.swift index 748bdb5cd..d47188e0f 100644 --- a/iOS/MasterTimeline/Cell/MasterUnreadIndicatorView.swift +++ b/iOS/MainTimeline/Cell/MainUnreadIndicatorView.swift @@ -8,7 +8,7 @@ import UIKit -@MainActor class MasterUnreadIndicatorView: UIView { +@MainActor class MainUnreadIndicatorView: UIView { override func layoutSubviews() { super.layoutSubviews() diff --git a/iOS/MasterTimeline/Cell/MultilineUILabelSizer.swift b/iOS/MainTimeline/Cell/MultilineUILabelSizer.swift similarity index 100% rename from iOS/MasterTimeline/Cell/MultilineUILabelSizer.swift rename to iOS/MainTimeline/Cell/MultilineUILabelSizer.swift diff --git a/iOS/MasterTimeline/Cell/SingleLineUILabelSizer.swift b/iOS/MainTimeline/Cell/SingleLineUILabelSizer.swift similarity index 100% rename from iOS/MasterTimeline/Cell/SingleLineUILabelSizer.swift rename to iOS/MainTimeline/Cell/SingleLineUILabelSizer.swift diff --git a/iOS/MasterTimeline/MasterTimelineDataSource.swift b/iOS/MainTimeline/MainTimelineDataSource.swift similarity index 56% rename from iOS/MasterTimeline/MasterTimelineDataSource.swift rename to iOS/MainTimeline/MainTimelineDataSource.swift index 156b04f28..c2daadd77 100644 --- a/iOS/MasterTimeline/MasterTimelineDataSource.swift +++ b/iOS/MainTimeline/MainTimelineDataSource.swift @@ -8,7 +8,7 @@ import UIKit -@MainActor final class MasterTimelineDataSource: UITableViewDiffableDataSource where SectionIdentifierType : Hashable, ItemIdentifierType : Hashable { +@MainActor final class MainTimelineDataSource: UITableViewDiffableDataSource where SectionIdentifierType : Hashable, ItemIdentifierType : Hashable { override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { return true diff --git a/iOS/MasterTimeline/MasterTimelineTitleView.swift b/iOS/MainTimeline/MainTimelineTitleView.swift similarity index 87% rename from iOS/MasterTimeline/MasterTimelineTitleView.swift rename to iOS/MainTimeline/MainTimelineTitleView.swift index 3eaecd70e..97ddb0fc1 100644 --- a/iOS/MasterTimeline/MasterTimelineTitleView.swift +++ b/iOS/MainTimeline/MainTimelineTitleView.swift @@ -8,11 +8,11 @@ import UIKit -@MainActor final class MasterTimelineTitleView: UIView { +@MainActor final class MainTimelineTitleView: UIView { @IBOutlet weak var iconView: IconView! @IBOutlet weak var label: UILabel! - @IBOutlet weak var unreadCountView: MasterTimelineUnreadCountView! + @IBOutlet weak var unreadCountView: MainTimelineUnreadCountView! private lazy var pointerInteraction: UIPointerInteraction = { UIPointerInteraction(delegate: self) @@ -45,7 +45,7 @@ import UIKit } -extension MasterTimelineTitleView: UIPointerInteractionDelegate { +extension MainTimelineTitleView: UIPointerInteractionDelegate { func pointerInteraction(_ interaction: UIPointerInteraction, styleFor region: UIPointerRegion) -> UIPointerStyle? { var rect = self.frame diff --git a/iOS/MasterTimeline/MasterTimelineUnreadCountView.swift b/iOS/MainTimeline/MainTimelineUnreadCountView.swift similarity index 91% rename from iOS/MasterTimeline/MasterTimelineUnreadCountView.swift rename to iOS/MainTimeline/MainTimelineUnreadCountView.swift index a89b37fd7..b9e9ba315 100644 --- a/iOS/MasterTimeline/MasterTimelineUnreadCountView.swift +++ b/iOS/MainTimeline/MainTimelineUnreadCountView.swift @@ -8,7 +8,7 @@ import UIKit -@MainActor final class MasterTimelineUnreadCountView: MasterFeedUnreadCountView { +@MainActor final class MainTimelineUnreadCountView: MainFeedUnreadCountView { override var padding: UIEdgeInsets { return UIEdgeInsets(top: 2.0, left: 9.0, bottom: 2.0, right: 9.0) diff --git a/iOS/MasterTimeline/MasterTimelineViewController.swift b/iOS/MainTimeline/MainTimelineViewController.swift similarity index 92% rename from iOS/MasterTimeline/MasterTimelineViewController.swift rename to iOS/MainTimeline/MainTimelineViewController.swift index 6c51fe212..5761eec0c 100644 --- a/iOS/MasterTimeline/MasterTimelineViewController.swift +++ b/iOS/MainTimeline/MainTimelineViewController.swift @@ -1,5 +1,5 @@ // -// MasterTimelineViewController.swift +// MainTimelineViewController.swift // NetNewsWire // // Created by Maurice Parker on 4/8/19. @@ -13,7 +13,7 @@ import RSCore import Account import Articles -class MasterTimelineViewController: UITableViewController, UndoableCommandRunner, MainControllerIdentifiable { +class MainTimelineViewController: UITableViewController, UndoableCommandRunner, MainControllerIdentifiable { private var numberOfTextLines = 0 private var iconSize = IconSize.medium @@ -37,8 +37,8 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner private var markAsReadOnScrollEnd: Int? private var lastVerticalPosition: CGFloat = 0 - var mainControllerIdentifier = MainControllerIdentifier.masterTimeline - + var mainControllerIdentifier = MainControllerIdentifier.mainTimeline + weak var coordinator: SceneCoordinator! var undoableCommands = [UndoableCommand]() @@ -98,7 +98,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner iconSize = AppDefaults.shared.timelineIconSize resetEstimatedRowHeight() - if let titleView = Bundle.main.loadNibNamed("MasterTimelineTitleView", owner: self, options: nil)?[0] as? MasterTimelineTitleView { + if let titleView = Bundle.main.loadNibNamed("MasterTimelineTitleView", owner: self, options: nil)?[0] as? MainTimelineTitleView { navigationItem.titleView = titleView } @@ -460,7 +460,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner for article in visibleUpdatedArticles { if let indexPath = dataSource.indexPath(for: article) { - if let cell = tableView.cellForRow(at: indexPath) as? MasterTimelineTableViewCell { + if let cell = tableView.cellForRow(at: indexPath) as? MainTimelineTableViewCell { configure(cell, article: article, indexPath: indexPath) } } @@ -469,7 +469,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner @objc func feedIconDidBecomeAvailable(_ note: Notification) { - if let titleView = navigationItem.titleView as? MasterTimelineTitleView { + if let titleView = navigationItem.titleView as? MainTimelineTitleView { titleView.iconView.iconImage = coordinator.timelineIconImage } @@ -483,7 +483,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner guard let article = dataSource.itemIdentifier(for: indexPath) else { continue } - if article.feed == feed, let cell = tableView.cellForRow(at: indexPath) as? MasterTimelineTableViewCell, let image = iconImageFor(article) { + if article.feed == feed, let cell = tableView.cellForRow(at: indexPath) as? MainTimelineTableViewCell, let image = iconImageFor(article) { cell.setIconImage(image) } } @@ -501,7 +501,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner continue } for author in authors { - if author.avatarURL == avatarURL, let cell = tableView.cellForRow(at: indexPath) as? MasterTimelineTableViewCell, let image = iconImageFor(article) { + if author.avatarURL == avatarURL, let cell = tableView.cellForRow(at: indexPath) as? MainTimelineTableViewCell, let image = iconImageFor(article) { cell.setIconImage(image) } } @@ -509,7 +509,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner } @objc func faviconDidBecomeAvailable(_ note: Notification) { - if let titleView = navigationItem.titleView as? MasterTimelineTitleView { + if let titleView = navigationItem.titleView as? MainTimelineTitleView { titleView.iconView.iconImage = coordinator.timelineIconImage } if coordinator.showIcons { @@ -534,7 +534,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner } @objc func displayNameDidChange(_ note: Notification) { - if let titleView = navigationItem.titleView as? MasterTimelineTitleView { + if let titleView = navigationItem.titleView as? MainTimelineTitleView { titleView.label.text = coordinator.timelineFeed?.nameForDisplay } } @@ -566,19 +566,19 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner private func resetEstimatedRowHeight() { - let longTitle = "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?" + let longTitle = "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the architect of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?" let prototypeID = "prototype" let status = ArticleStatus(articleID: prototypeID, read: false, starred: false, dateArrived: Date()) let prototypeArticle = Article(accountID: prototypeID, articleID: prototypeID, feedID: prototypeID, uniqueID: prototypeID, title: longTitle, contentHTML: nil, contentText: nil, url: nil, externalURL: nil, summary: nil, imageURL: nil, datePublished: nil, dateModified: nil, authors: nil, status: status) - let prototypeCellData = MasterTimelineCellData(article: prototypeArticle, showFeedName: .feed, feedName: "Prototype Feed Name", byline: nil, iconImage: nil, showIcon: false, featuredImage: nil, numberOfLines: numberOfTextLines, iconSize: iconSize, hideSeparator: false) + let prototypeCellData = MainTimelineCellData(article: prototypeArticle, showFeedName: .feed, feedName: "Prototype Feed Name", byline: nil, iconImage: nil, showIcon: false, featuredImage: nil, numberOfLines: numberOfTextLines, iconSize: iconSize, hideSeparator: false) if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory { - let layout = MasterTimelineAccessibilityCellLayout(width: tableView.bounds.width, insets: tableView.safeAreaInsets, cellData: prototypeCellData) + let layout = MainTimelineAccessibilityCellLayout(width: tableView.bounds.width, insets: tableView.safeAreaInsets, cellData: prototypeCellData) tableView.estimatedRowHeight = layout.height } else { - let layout = MasterTimelineDefaultCellLayout(width: tableView.bounds.width, insets: tableView.safeAreaInsets, cellData: prototypeCellData) + let layout = MainTimelineDefaultCellLayout(width: tableView.bounds.width, insets: tableView.safeAreaInsets, cellData: prototypeCellData) tableView.estimatedRowHeight = layout.height } @@ -588,7 +588,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner // MARK: Searching -extension MasterTimelineViewController: UISearchControllerDelegate { +extension MainTimelineViewController: UISearchControllerDelegate { func willPresentSearchController(_ searchController: UISearchController) { coordinator.beginSearching() @@ -602,7 +602,7 @@ extension MasterTimelineViewController: UISearchControllerDelegate { } -extension MasterTimelineViewController: UISearchResultsUpdating { +extension MainTimelineViewController: UISearchResultsUpdating { func updateSearchResults(for searchController: UISearchController) { let searchScope = SearchScope(rawValue: searchController.searchBar.selectedScopeButtonIndex)! @@ -611,7 +611,7 @@ extension MasterTimelineViewController: UISearchResultsUpdating { } -extension MasterTimelineViewController: UISearchBarDelegate { +extension MainTimelineViewController: UISearchBarDelegate { func searchBar(_ searchBar: UISearchBar, selectedScopeButtonIndexDidChange selectedScope: Int) { let searchScope = SearchScope(rawValue: selectedScope)! coordinator.searchArticles(searchBar.text!, searchScope) @@ -620,7 +620,7 @@ extension MasterTimelineViewController: UISearchBarDelegate { // MARK: Private -private extension MasterTimelineViewController { +private extension MainTimelineViewController { func configureToolbar() { guard splitViewController?.isCollapsed ?? true else { @@ -634,7 +634,7 @@ private extension MasterTimelineViewController { title = coordinator.timelineFeed?.nameForDisplay ?? "Timeline" - if let titleView = navigationItem.titleView as? MasterTimelineTitleView { + if let titleView = navigationItem.titleView as? MainTimelineTitleView { let timelineIconImage = coordinator.timelineIconImage titleView.iconView.iconImage = timelineIconImage if let preferredColor = timelineIconImage?.preferredColor { @@ -698,7 +698,7 @@ private extension MasterTimelineViewController { } func updateTitleUnreadCount() { - if let titleView = navigationItem.titleView as? MasterTimelineTitleView { + if let titleView = navigationItem.titleView as? MainTimelineTitleView { titleView.unreadCountView.unreadCount = coordinator.timelineUnreadCount } } @@ -724,8 +724,8 @@ private extension MasterTimelineViewController { func makeDataSource() -> UITableViewDiffableDataSource { let dataSource: UITableViewDiffableDataSource = - MasterTimelineDataSource(tableView: tableView, cellProvider: { [weak self] tableView, indexPath, article in - let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MasterTimelineTableViewCell + MainTimelineDataSource(tableView: tableView, cellProvider: { [weak self] tableView, indexPath, article in + let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MainTimelineTableViewCell self?.configure(cell, article: article, indexPath: indexPath) return cell }) @@ -733,7 +733,7 @@ private extension MasterTimelineViewController { return dataSource } - func configure(_ cell: MasterTimelineTableViewCell, article: Article, indexPath: IndexPath) { + func configure(_ cell: MainTimelineTableViewCell, article: Article, indexPath: IndexPath) { let iconImage = iconImageFor(article) let featuredImage = featuredImageFor(article) @@ -741,7 +741,7 @@ private extension MasterTimelineViewController { let showIcon = coordinator.showIcons && iconImage != nil let hideSeparater = indexPath.row == coordinator.articles.count - 1 - cell.cellData = MasterTimelineCellData(article: article, showFeedName: showFeedNames, feedName: article.feed?.nameForDisplay, byline: article.byline(), iconImage: iconImage, showIcon: showIcon, featuredImage: featuredImage, numberOfLines: numberOfTextLines, iconSize: iconSize, hideSeparator: hideSeparater) + cell.cellData = MainTimelineCellData(article: article, showFeedName: showFeedNames, feedName: article.feed?.nameForDisplay, byline: article.byline(), iconImage: iconImage, showIcon: showIcon, featuredImage: featuredImage, numberOfLines: numberOfTextLines, iconSize: iconSize, hideSeparator: hideSeparater) } func iconImageFor(_ article: Article) -> IconImage? { diff --git a/iOS/MasterTimeline/MarkAsReadAlertController.swift b/iOS/MainTimeline/MarkAsReadAlertController.swift similarity index 100% rename from iOS/MasterTimeline/MarkAsReadAlertController.swift rename to iOS/MainTimeline/MarkAsReadAlertController.swift diff --git a/iOS/MasterTimeline/en-GB.lproj/MasterTimelineTitleView.strings b/iOS/MainTimeline/en-GB.lproj/MainTimelineTitleView.strings similarity index 100% rename from iOS/MasterTimeline/en-GB.lproj/MasterTimelineTitleView.strings rename to iOS/MainTimeline/en-GB.lproj/MainTimelineTitleView.strings diff --git a/iOS/MasterTimeline/zh-Hans.lproj/MasterTimelineTitleView.strings b/iOS/MainTimeline/zh-Hans.lproj/MainTimelineTitleView.strings similarity index 100% rename from iOS/MasterTimeline/zh-Hans.lproj/MasterTimelineTitleView.strings rename to iOS/MainTimeline/zh-Hans.lproj/MainTimelineTitleView.strings diff --git a/iOS/MasterTimeline/Cell/MasterTimelineAccessibilityCellLayout.swift b/iOS/MasterTimeline/Cell/MasterTimelineAccessibilityCellLayout.swift deleted file mode 100644 index 6c5390ec3..000000000 --- a/iOS/MasterTimeline/Cell/MasterTimelineAccessibilityCellLayout.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// MasterTimelineAccessibilityCellLayout.swift -// NetNewsWire-iOS -// -// Created by Maurice Parker on 4/29/19. -// Copyright © 2019 Ranchero Software. All rights reserved. -// - -import UIKit -import RSCore - -@MainActor struct MasterTimelineAccessibilityCellLayout: MasterTimelineCellLayout { - - let height: CGFloat - let unreadIndicatorRect: CGRect - let starRect: CGRect - let iconImageRect: CGRect - let titleRect: CGRect - let summaryRect: CGRect - let feedNameRect: CGRect - let dateRect: CGRect - - init(width: CGFloat, insets: UIEdgeInsets, cellData: MasterTimelineCellData) { - - var currentPoint = CGPoint.zero - currentPoint.x = MasterTimelineDefaultCellLayout.cellPadding.left + insets.left + MasterTimelineDefaultCellLayout.unreadCircleMarginLeft - currentPoint.y = MasterTimelineDefaultCellLayout.cellPadding.top - - // Unread Indicator and Star - self.unreadIndicatorRect = MasterTimelineAccessibilityCellLayout.rectForUnreadIndicator(currentPoint) - self.starRect = MasterTimelineAccessibilityCellLayout.rectForStar(currentPoint) - - // Start the point at the beginning position of the main block - currentPoint.x += MasterTimelineDefaultCellLayout.unreadCircleDimension + MasterTimelineDefaultCellLayout.unreadCircleMarginRight - - // Icon Image - if cellData.showIcon { - self.iconImageRect = MasterTimelineAccessibilityCellLayout.rectForIconView(currentPoint, iconSize: cellData.iconSize) - currentPoint.y = self.iconImageRect.maxY - } else { - self.iconImageRect = CGRect.zero - } - - let textAreaWidth = width - (currentPoint.x + MasterTimelineDefaultCellLayout.cellPadding.right + insets.right) - - // Title Text Block - let (titleRect, numberOfLinesForTitle) = MasterTimelineAccessibilityCellLayout.rectForTitle(cellData, currentPoint, textAreaWidth) - self.titleRect = titleRect - - // Summary Text Block - if self.titleRect != CGRect.zero { - currentPoint.y = self.titleRect.maxY + MasterTimelineDefaultCellLayout.titleBottomMargin - } - self.summaryRect = MasterTimelineAccessibilityCellLayout.rectForSummary(cellData, currentPoint, textAreaWidth, numberOfLinesForTitle) - - currentPoint.y = [self.titleRect, self.summaryRect].maxY() - - if cellData.showFeedName != .none { - self.feedNameRect = MasterTimelineAccessibilityCellLayout.rectForFeedName(cellData, currentPoint, textAreaWidth) - currentPoint.y = self.feedNameRect.maxY - } else { - self.feedNameRect = CGRect.zero - } - - // Feed Name and Pub Date - self.dateRect = MasterTimelineAccessibilityCellLayout.rectForDate(cellData, currentPoint, textAreaWidth) - - self.height = self.dateRect.maxY + MasterTimelineDefaultCellLayout.cellPadding.bottom - - } - -} - -// MARK: - Calculate Rects - -private extension MasterTimelineAccessibilityCellLayout { - - static func rectForDate(_ cellData: MasterTimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { - - var r = CGRect.zero - - let size = SingleLineUILabelSizer.size(for: cellData.dateString, font: MasterTimelineDefaultCellLayout.dateFont) - r.size = size - r.origin = point - - return r - - } - -} diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 362a09d1f..ffc89f668 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -21,8 +21,8 @@ protocol MainControllerIdentifiable { enum MainControllerIdentifier { case none - case masterFeed - case masterTimeline + case mainFeed + case mainTimeline case article } @@ -63,8 +63,8 @@ struct FeedNode: Hashable { private var activityManager = ActivityManager() private var rootSplitViewController: RootSplitViewController! - private var masterFeedViewController: MasterFeedViewController! - private var masterTimelineViewController: MasterTimelineViewController? + private var mainFeedViewController: MainFeedViewController! + private var mainTimelineViewController: MainTimelineViewController? private var articleViewController: ArticleViewController? private var lastMainControllerToAppear = MainControllerIdentifier.none @@ -292,16 +292,16 @@ struct FeedNode: Hashable { super.init() - self.masterFeedViewController = rootSplitViewController.viewController(for: .primary) as? MasterFeedViewController - self.masterFeedViewController.coordinator = self - if let navController = self.masterFeedViewController?.navigationController { + self.mainFeedViewController = rootSplitViewController.viewController(for: .primary) as? MainFeedViewController + self.mainFeedViewController.coordinator = self + if let navController = self.mainFeedViewController?.navigationController { navController.delegate = self configureNavigationController(navController) } - self.masterTimelineViewController = rootSplitViewController.viewController(for: .supplementary) as? MasterTimelineViewController - self.masterTimelineViewController?.coordinator = self - if let navController = self.masterTimelineViewController?.navigationController { + self.mainTimelineViewController = rootSplitViewController.viewController(for: .supplementary) as? MainTimelineViewController + self.mainTimelineViewController?.coordinator = self + if let navController = self.mainTimelineViewController?.navigationController { navController.delegate = self configureNavigationController(navController) } @@ -397,9 +397,9 @@ struct FeedNode: Hashable { func resetFocus() { if currentArticle != nil { - masterTimelineViewController?.focus() + mainTimelineViewController?.focus() } else { - masterFeedViewController?.focus() + mainFeedViewController?.focus() } } @@ -416,7 +416,7 @@ struct FeedNode: Hashable { selectFeed(indexPath: nil) { self.rootSplitViewController.show(.supplementary) DispatchQueue.main.asyncAfter(deadline: .now()) { - self.masterTimelineViewController!.showSearchAll() + self.mainTimelineViewController!.showSearchAll() } } } @@ -449,7 +449,7 @@ struct FeedNode: Hashable { @objc func containerChildrenDidChange(_ note: Notification) { if timelineFetcherContainsAnyPseudoFeed() || timelineFetcherContainsAnyFolder() { fetchAndMergeArticlesAsync(animated: true) { - self.masterTimelineViewController?.reinitializeArticles(resetScroll: false) + self.mainTimelineViewController?.reinitializeArticles(resetScroll: false) self.rebuildBackingStores() } } else { @@ -468,7 +468,7 @@ struct FeedNode: Hashable { @objc func accountStateDidChange(_ note: Notification) { if timelineFetcherContainsAnyPseudoFeed() { fetchAndMergeArticlesAsync(animated: true) { - self.masterTimelineViewController?.reinitializeArticles(resetScroll: false) + self.mainTimelineViewController?.reinitializeArticles(resetScroll: false) self.rebuildBackingStores() } } else { @@ -486,7 +486,7 @@ struct FeedNode: Hashable { if timelineFetcherContainsAnyPseudoFeed() { fetchAndMergeArticlesAsync(animated: true) { - self.masterTimelineViewController?.reinitializeArticles(resetScroll: false) + self.mainTimelineViewController?.reinitializeArticles(resetScroll: false) self.rebuildBackingStores(updateExpandedNodes: expandNewAccount) } } else { @@ -504,7 +504,7 @@ struct FeedNode: Hashable { if timelineFetcherContainsAnyPseudoFeed() { fetchAndMergeArticlesAsync(animated: true) { - self.masterTimelineViewController?.reinitializeArticles(resetScroll: false) + self.mainTimelineViewController?.reinitializeArticles(resetScroll: false) self.rebuildBackingStores(updateExpandedNodes: cleanupAccount) } } else { @@ -601,7 +601,7 @@ struct FeedNode: Hashable { treeControllerDelegate.isReadFiltered = true } rebuildBackingStores() - masterFeedViewController?.updateUI() + mainFeedViewController?.updateUI() } func toggleReadArticlesFilter() { @@ -696,7 +696,7 @@ struct FeedNode: Hashable { exceptionArticleFetcher = SingleArticleFetcher(account: account, articleID: article.articleID) } fetchAndReplaceArticlesAsync(animated: true) { - self.masterTimelineViewController?.reinitializeArticles(resetScroll: resetScroll) + self.mainTimelineViewController?.reinitializeArticles(resetScroll: resetScroll) } } @@ -769,7 +769,7 @@ struct FeedNode: Hashable { clearTimelineIfNoLongerAvailable() } - func masterFeedIndexPathForCurrentTimeline() -> IndexPath? { + func mainFeedIndexPathForCurrentTimeline() -> IndexPath? { guard let node = treeController.rootNode.descendantNodeRepresentingObject(timelineFeed as AnyObject) else { return nil } @@ -794,7 +794,7 @@ struct FeedNode: Hashable { } currentFeedIndexPath = indexPath - masterFeedViewController.updateFeedSelection(animations: animations) + mainFeedViewController.updateFeedSelection(animations: animations) if deselectArticle { selectArticle(nil) @@ -867,7 +867,7 @@ struct FeedNode: Hashable { if article == nil { rootSplitViewController.show(.supplementary) - masterTimelineViewController?.updateArticleSelection(animations: animations) + mainTimelineViewController?.updateArticleSelection(animations: animations) articleViewController?.article = nil return } @@ -876,7 +876,7 @@ struct FeedNode: Hashable { // Mark article as read before navigating to it, so the read status does not flash unread/read on display markArticles(Set([article!]), statusKey: .read, flag: true) - masterTimelineViewController?.updateArticleSelection(animations: animations) + mainTimelineViewController?.updateArticleSelection(animations: animations) articleViewController?.article = article if let isShowingExtractedArticle = isShowingExtractedArticle, let articleWindowScrollY = articleWindowScrollY { articleViewController?.restoreScrollPosition = (isShowingExtractedArticle, articleWindowScrollY) @@ -897,7 +897,7 @@ struct FeedNode: Hashable { emptyTheTimeline() timelineFeed = oldTimelineFeed replaceArticles(with: savedSearchArticles!, animated: true) - masterTimelineViewController?.reinitializeArticles(resetScroll: true) + mainTimelineViewController?.reinitializeArticles(resetScroll: true) } else { setTimelineFeed(nil, animated: true) } @@ -909,7 +909,7 @@ struct FeedNode: Hashable { savedSearchArticles = nil isSearching = false selectArticle(nil) - masterTimelineViewController?.focus() + mainTimelineViewController?.focus() } func searchArticles(_ searchString: String, _ searchScope: SearchScope) { @@ -1007,7 +1007,7 @@ struct FeedNode: Hashable { } if self.isSearching { - self.masterTimelineViewController?.hideSearch() + self.mainTimelineViewController?.hideSearch() } selectNextUnreadFeed() { @@ -1129,7 +1129,7 @@ struct FeedNode: Hashable { func discloseFeed(_ feed: Feed, initialLoad: Bool = false, animations: Animations = [], completion: (() -> Void)? = nil) { if isSearching { - masterTimelineViewController?.hideSearch() + mainTimelineViewController?.hideSearch() } guard let account = feed.account else { @@ -1212,14 +1212,14 @@ struct FeedNode: Hashable { addNavViewController.modalPresentationStyle = .formSheet addNavViewController.preferredContentSize = AddFeedViewController.preferredContentSizeForFormSheetDisplay - masterFeedViewController.present(addNavViewController, animated: true) + mainFeedViewController.present(addNavViewController, animated: true) } func showAddFolder() { let addNavViewController = UIStoryboard.add.instantiateViewController(withIdentifier: "AddFolderViewControllerNav") as! UINavigationController addNavViewController.modalPresentationStyle = .formSheet addNavViewController.preferredContentSize = AddFolderViewController.preferredContentSizeForFormSheetDisplay - masterFeedViewController.present(addNavViewController, animated: true) + mainFeedViewController.present(addNavViewController, animated: true) } func showFullScreenImage(image: UIImage, imageTitle: String?, transitioningDelegate: UIViewControllerTransitioningDelegate) { @@ -1268,12 +1268,12 @@ struct FeedNode: Hashable { articleViewController?.openInAppBrowser() } else { - masterFeedViewController.openInAppBrowser() + mainFeedViewController.openInAppBrowser() } } @MainActor func navigateToFeeds() { - masterFeedViewController?.focus() + mainFeedViewController?.focus() selectArticle(nil) } @@ -1281,7 +1281,7 @@ struct FeedNode: Hashable { if currentArticle == nil && articles.count > 0 { selectArticle(articles[0]) } - masterTimelineViewController?.focus() + mainTimelineViewController?.focus() } func navigateToDetail() { @@ -1310,7 +1310,7 @@ struct FeedNode: Hashable { /// `SFSafariViewController` or `SettingsViewController`, /// otherwise, this function does nothing. func dismissIfLaunchingFromExternalAction() { - guard let presentedController = masterFeedViewController.presentedViewController else { return } + guard let presentedController = mainFeedViewController.presentedViewController else { return } if presentedController.isKind(of: SFSafariViewController.self) { presentedController.dismiss(animated: true, completion: nil) @@ -1379,7 +1379,7 @@ extension SceneCoordinator: UINavigationControllerDelegate { } // If we are showing the Feeds and only the feeds start clearing stuff - if viewController === masterFeedViewController && lastMainControllerToAppear == .masterTimeline { + if viewController === mainFeedViewController && lastMainControllerToAppear == .mainTimeline { activityManager.invalidateCurrentActivities() selectFeed(nil, animations: [.scroll, .select, .navigation]) return @@ -1389,7 +1389,7 @@ extension SceneCoordinator: UINavigationControllerDelegate { // Don't clear it if we have pushed an ArticleViewController, but don't yet see it on the navigation stack. // This happens when we are going to the next unread and we need to grab another timeline to continue. The // ArticleViewController will be pushed, but we will briefly show the Timeline. Don't clear things out when that happens. - if viewController === masterTimelineViewController && lastMainControllerToAppear == .article { + if viewController === mainTimelineViewController && lastMainControllerToAppear == .article { selectArticle(nil, animations: [.scroll, .select, .navigation]) // Restore any bars hidden by the article controller @@ -1539,7 +1539,7 @@ private extension SceneCoordinator { updateExpandedNodes?() let changes = rebuildShadowTable() - masterFeedViewController.reloadFeeds(initialLoad: initialLoad, changes: changes, completion: completion) + mainFeedViewController.reloadFeeds(initialLoad: initialLoad, changes: changes, completion: completion) } } @@ -1669,7 +1669,7 @@ private extension SceneCoordinator { timelineFeed = feed fetchAndReplaceArticlesAsync(animated: animated) { - self.masterTimelineViewController?.reinitializeArticles(resetScroll: true) + self.mainTimelineViewController?.reinitializeArticles(resetScroll: true) completion?() } } @@ -1984,7 +1984,7 @@ private extension SceneCoordinator { articles = sortedArticles updateShowNamesAndIcons() updateUnreadCount() - masterTimelineViewController?.reloadArticles(animated: animated) + mainTimelineViewController?.reloadArticles(animated: animated) } } @@ -1994,8 +1994,8 @@ private extension SceneCoordinator { @objc func fetchAndMergeArticlesAsync() { fetchAndMergeArticlesAsync(animated: true) { - self.masterTimelineViewController?.reinitializeArticles(resetScroll: false) - self.masterTimelineViewController?.restoreSelectionIfNecessary(adjustScroll: false) + self.mainTimelineViewController?.reinitializeArticles(resetScroll: false) + self.mainTimelineViewController?.restoreSelectionIfNecessary(adjustScroll: false) } } @@ -2146,7 +2146,7 @@ private extension SceneCoordinator { self.treeControllerDelegate.resetFilterExceptions() if let indexPath = self.indexPathFor(smartFeed) { self.selectFeed(indexPath: indexPath) { - self.masterFeedViewController.focus() + self.mainFeedViewController.focus() } } }) @@ -2167,7 +2167,7 @@ private extension SceneCoordinator { if let folderNode = self.findFolderNode(folderName: folderName, beginningAt: accountNode), let indexPath = self.indexPathFor(folderNode) { self.selectFeed(indexPath: indexPath) { - self.masterFeedViewController.focus() + self.mainFeedViewController.focus() } } }) @@ -2180,7 +2180,7 @@ private extension SceneCoordinator { } self.discloseFeed(feed, initialLoad: true) { - self.masterFeedViewController.focus() + self.mainFeedViewController.focus() } } }