From d119cdf6400ee8b20e41fd576c8a2c277123e43c Mon Sep 17 00:00:00 2001 From: Chris Li Date: Wed, 18 Jan 2017 14:57:16 -0500 Subject: [PATCH] Refactor --- .../Bookmark/BookmarkController.swift | 249 ------------------ .../Bookmark/BookmarkSplitController.swift | 44 ---- .../Setting/SettingsController.swift | 95 +++++++ Kiwix-iOS/Storyboard/Bookmark.storyboard | 117 +------- Kiwix.xcodeproj/project.pbxproj | 25 +- 5 files changed, 116 insertions(+), 414 deletions(-) delete mode 100644 Kiwix-iOS/Controller/Bookmark/BookmarkController.swift delete mode 100644 Kiwix-iOS/Controller/Bookmark/BookmarkSplitController.swift create mode 100644 Kiwix-iOS/Controller/Setting/SettingsController.swift diff --git a/Kiwix-iOS/Controller/Bookmark/BookmarkController.swift b/Kiwix-iOS/Controller/Bookmark/BookmarkController.swift deleted file mode 100644 index f715ec23..00000000 --- a/Kiwix-iOS/Controller/Bookmark/BookmarkController.swift +++ /dev/null @@ -1,249 +0,0 @@ -// -// BookmarkController.swift -// Kiwix -// -// Created by Chris Li on 9/27/16. -// Copyright © 2016 Chris Li. All rights reserved. -// - -import UIKit -import CoreData -import ProcedureKit -import DZNEmptyDataSet - -class BookmarkController: UITableViewController, NSFetchedResultsControllerDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate { - - var book: Book? - var isTopViewController: Bool { - return self == navigationController?.viewControllers.first - } - - // MARK: - Overrides - - override func viewDidLoad() { - super.viewDidLoad() - title = LocalizedStrings.bookmarks - clearsSelectionOnViewWillAppear = true - tableView.estimatedRowHeight = 66.0 - tableView.rowHeight = UITableViewAutomaticDimension - tableView.allowsMultipleSelectionDuringEditing = true - tableView.emptyDataSetSource = self - tableView.emptyDataSetDelegate = self - - if isTopViewController { - navigationItem.leftBarButtonItem = UIBarButtonItem(imageNamed: "Cross", target: self, action: #selector(BookmarkController.dismissSelf)) - } - } - - override func setEditing(_ editing: Bool, animated: Bool) { - super.setEditing(editing, animated: animated) - - switch (editing, isTopViewController) { - case (true, true), (true, false): - navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .trash, target: self, action: #selector(BookmarkController.trashButtonTapped(_:))) - navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(BookmarkController.editButtonTapped(_:))) - case (false, true): - navigationItem.leftBarButtonItem = UIBarButtonItem(imageNamed: "Cross", target: self, action: #selector(BookmarkController.dismissSelf)) - navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .edit, target: self, action: #selector(BookmarkController.editButtonTapped(_:))) - case (false, false): - navigationItem.leftBarButtonItem = nil - navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .edit, target: self, action: #selector(BookmarkController.editButtonTapped(_:))) - } - } - - // MARK: - Action - - func trash(articles: [Article]) { - let operation = BookmarkTrashOperation(articles: articles) - operation.addObserver(DidFinishObserver { _ in - OperationQueue.mainQueue().addOperationWithBlock({ - guard self.fetchedResultController.fetchedObjects?.count == 0 else {return} - self.navigationController?.popViewControllerAnimated(true) - }) - }) - GlobalQueue.shared.addOperation(operation) - } - - func trashButtonTapped(_ sender: UIBarButtonItem) { - guard isEditing else {return} - guard let selectedIndexPathes = tableView.indexPathsForSelectedRows else {return} - let articles = selectedIndexPathes.flatMap() {fetchedResultController.object(at: $0) as? Article} - trash(articles: articles) - } - - @IBAction func editButtonTapped(_ sender: UIBarButtonItem) { - setEditing(!isEditing, animated: true) - } - - func dismissSelf() { - dismiss(animated: true, completion: nil) - } - - // MARK: - Empty table datasource & delegate - - func image(forEmptyDataSet scrollView: UIScrollView!) -> UIImage! { - return UIImage(named: "BookmarkColor") - } - - func title(forEmptyDataSet scrollView: UIScrollView!) -> NSAttributedString! { - let text = LocalizedStrings.bookmarks - let attributes = [NSFontAttributeName: UIFont.boldSystemFont(ofSize: 18.0), - NSForegroundColorAttributeName: UIColor.darkGray] - return NSAttributedString(string: text, attributes: attributes) - } - - func description(forEmptyDataSet scrollView: UIScrollView!) -> NSAttributedString! { - let text = NSLocalizedString("To add a bookmark, long press the star button when reading an article", comment: "Bookmarks view message") - let style = NSMutableParagraphStyle() - style.lineBreakMode = .byWordWrapping - style.alignment = .center - let attributes = [NSFontAttributeName: UIFont.boldSystemFont(ofSize: 14.0), - NSForegroundColorAttributeName: UIColor.lightGray, - NSParagraphStyleAttributeName: style] - return NSAttributedString(string: text, attributes: attributes) - } - - func spaceHeight(forEmptyDataSet scrollView: UIScrollView!) -> CGFloat { - return 30.0 - } - - // MARK: - Table view data source - - override func numberOfSections(in tableView: UITableView) -> Int { - return fetchedResultController.sections?.count ?? 0 - } - - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - guard let sectionInfo = fetchedResultController.sections?[section] else {return 0} - return sectionInfo.numberOfObjects - } - - override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let article = fetchedResultController.object(at: indexPath) as? Article - if let _ = article?.snippet { - let cell = tableView.dequeueReusableCell(withIdentifier: "BookmarkSnippetCell", for: indexPath) - configureSnippetCell(cell, atIndexPath: indexPath) - return cell - } else { - let cell = tableView.dequeueReusableCell(withIdentifier: "BookmarkCell", for: indexPath) - configureCell(cell, atIndexPath: indexPath) - return cell - } - } - - func configureCell(_ cell: UITableViewCell, atIndexPath indexPath: IndexPath) { - guard let cell = cell as? BookmarkCell else {return} - guard let article = fetchedResultController.object(at: indexPath) as? Article else {return} - - cell.thumbImageView.image = { - guard let data = article.thumbImageData else {return nil} - return UIImage(data: data) - }() - cell.titleLabel.text = article.title - cell.subtitleLabel.text = article.book?.title - } - - func configureSnippetCell(_ cell: UITableViewCell, atIndexPath indexPath: IndexPath) { - configureCell(cell, atIndexPath: indexPath) - - guard let cell = cell as? BookmarkSnippetCell else {return} - guard let article = fetchedResultController.object(at: indexPath) as? Article else {return} - cell.snippetLabel.text = article.snippet - } - - // MARK: - Table view delegate - - override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - guard !tableView.isEditing else {return} - defer {dismiss(animated: true, completion: nil)} - guard let article = fetchedResultController.object(at: indexPath) as? Article, - let url = article.url else {return} - - let operation = ArticleLoadOperation(url: url) - GlobalQueue.shared.add(load: operation) - } - - override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { - return true - } - - override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {} - - override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? { - let remove = UITableViewRowAction(style: UITableViewRowActionStyle(), title: LocalizedStrings.remove) { (action, indexPath) -> Void in - guard let article = self.fetchedResultController.object(at: indexPath) as? Article else {return} - let context = NSManagedObjectContext.mainQueueContext - context.performAndWait({ () -> Void in - article.isBookmarked = false - }) - self.trash(articles: [article]) - } - return [remove] - } - - override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { - return CGFloat.leastNormalMagnitude - } - - // MARK: - Fetched Result Controller Delegate - - let managedObjectContext = NSManagedObjectContext.mainQueueContext - lazy var fetchedResultController: NSFetchedResultsController = { () -> <> in - let fetchRequest = NSFetchRequest(entityName: "Article") - fetchRequest.sortDescriptors = [NSSortDescriptor(key: "bookmarkDate", ascending: false), - NSSortDescriptor(key: "title", ascending: true)] - fetchRequest.predicate = { - if let book = self.book { - return NSPredicate(format: "book = %@ AND isBookmarked = true", book) - } else { - return NSPredicate(format: "isBookmarked = true") - } - }() - let controller = NSFetchedResultsController(fetchRequest: fetchRequest, - managedObjectContext: self.managedObjectContext, - sectionNameKeyPath: nil, - cacheName: self.book == nil ? nil : "BookmarksFRC" + Bundle.appShortVersion) - controller.delegate = self - controller.performFetch(deleteCache: false) - return controller - }() - - // MARK: - Fetched Result Controller Delegate - - func controllerWillChangeContent(_ controller: NSFetchedResultsController) { - tableView.beginUpdates() - } - - func controller(_ controller: NSFetchedResultsController, didChange sectionInfo: NSFetchedResultsSectionInfo, atSectionIndex sectionIndex: Int, for type: NSFetchedResultsChangeType) { - switch type { - case .insert: - tableView.insertSections(IndexSet(integer: sectionIndex), with: .fade) - case .delete: - tableView.deleteSections(IndexSet(integer: sectionIndex), with: .fade) - default: - return - } - } - - func controller(_ controller: NSFetchedResultsController, didChange anObject: Any, at indexPath: IndexPath?, for type: NSFetchedResultsChangeType, newIndexPath: IndexPath?) { - switch type { - case .insert: - guard let newIndexPath = newIndexPath else {return} - tableView.insertRows(at: [newIndexPath], with: .left) - case .delete: - guard let indexPath = indexPath else {return} - tableView.deleteRows(at: [indexPath], with: .right) - case .update: - guard let indexPath = indexPath, let cell = tableView.cellForRow(at: indexPath) else {return} - configureCell(cell, atIndexPath: indexPath) - case .move: - guard let indexPath = indexPath, let newIndexPath = newIndexPath else {return} - tableView.deleteRows(at: [indexPath], with: .right) - tableView.insertRows(at: [newIndexPath], with: .left) - } - } - - func controllerDidChangeContent(_ controller: NSFetchedResultsController) { - tableView.endUpdates() - } -} diff --git a/Kiwix-iOS/Controller/Bookmark/BookmarkSplitController.swift b/Kiwix-iOS/Controller/Bookmark/BookmarkSplitController.swift deleted file mode 100644 index 3f7246ef..00000000 --- a/Kiwix-iOS/Controller/Bookmark/BookmarkSplitController.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// BookmarkSplitController.swift -// Kiwix -// -// Created by Chris Li on 1/12/17. -// Copyright © 2017 Chris Li. All rights reserved. -// - -import UIKit - -class BookmarkSplitController: UISplitViewController, UISplitViewControllerDelegate { - - override func viewDidLoad() { - super.viewDidLoad() - - preferredDisplayMode = .allVisible - minimumPrimaryColumnWidth = 320.0 - delegate = self - } - - override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { - guard traitCollection != previousTraitCollection else {return} - let controller: CoreDataTableBaseController? = { - let nav = viewControllers.first as? UINavigationController - return nav?.topViewController as? CoreDataTableBaseController - }() - controller?.tableView.indexPathsForVisibleRows?.forEach({ (indexPath) in - guard let cell = controller?.tableView.cellForRow(at: indexPath) else {return} - controller?.configureCell(cell, atIndexPath: indexPath) - }) - } - - func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController: UIViewController, onto primaryViewController: UIViewController) -> Bool { - if let nav = secondaryViewController as? UINavigationController, - let controller = nav.topViewController as? BookmarkCollectionController, - let _ = controller.book { - // show detail - return false - } else { - // show master - return true - } - } -} diff --git a/Kiwix-iOS/Controller/Setting/SettingsController.swift b/Kiwix-iOS/Controller/Setting/SettingsController.swift new file mode 100644 index 00000000..3f165fad --- /dev/null +++ b/Kiwix-iOS/Controller/Setting/SettingsController.swift @@ -0,0 +1,95 @@ +// +// SettingsController.swift +// Kiwix +// +// Created by Chris Li on 1/18/17. +// Copyright © 2017 Chris Li. All rights reserved. +// + +import UIKit + +class SettingsController: UITableViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Uncomment the following line to preserve selection between presentations + // self.clearsSelectionOnViewWillAppear = false + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem() + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + // MARK: - Table view data source + + override func numberOfSections(in tableView: UITableView) -> Int { + // #warning Incomplete implementation, return the number of sections + return 0 + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + // #warning Incomplete implementation, return the number of rows + return 0 + } + + /* + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath) + + // Configure the cell... + + return cell + } + */ + + /* + // Override to support conditional editing of the table view. + override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the specified item to be editable. + return true + } + */ + + /* + // Override to support editing the table view. + override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { + // Delete the row from the data source + tableView.deleteRows(at: [indexPath], with: .fade) + } else if editingStyle == .insert { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } + } + */ + + /* + // Override to support rearranging the table view. + override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) { + + } + */ + + /* + // Override to support conditional rearranging of the table view. + override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool { + // Return false if you do not want the item to be re-orderable. + return true + } + */ + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destinationViewController. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/Kiwix-iOS/Storyboard/Bookmark.storyboard b/Kiwix-iOS/Storyboard/Bookmark.storyboard index 204b1e5d..b8fa7ba7 100644 --- a/Kiwix-iOS/Storyboard/Bookmark.storyboard +++ b/Kiwix-iOS/Storyboard/Bookmark.storyboard @@ -6,6 +6,7 @@ + @@ -35,7 +36,7 @@ - + @@ -168,79 +169,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -258,10 +186,10 @@ - + - + @@ -354,20 +281,7 @@ - - - - - - - - - - - - - - + @@ -488,24 +402,6 @@ - - - - - - - - - - - - - - - - - - @@ -531,7 +427,4 @@ - - - diff --git a/Kiwix.xcodeproj/project.pbxproj b/Kiwix.xcodeproj/project.pbxproj index ba847d96..40ef36ed 100644 --- a/Kiwix.xcodeproj/project.pbxproj +++ b/Kiwix.xcodeproj/project.pbxproj @@ -64,7 +64,6 @@ 9757C74A1E10660B008A9469 /* DownloadManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9757C7491E10660B008A9469 /* DownloadManager.swift */; }; 9757C74C1E106958008A9469 /* BackgroundDownload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9757C74B1E106958008A9469 /* BackgroundDownload.swift */; }; 97599AA21E26D3B000BA15EF /* BookmarkBooksController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97599AA11E26D3B000BA15EF /* BookmarkBooksController.swift */; }; - 97599AE01E28031A00BA15EF /* BookmarkSplitController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97599ADF1E28031A00BA15EF /* BookmarkSplitController.swift */; }; 97599AE21E28193D00BA15EF /* BookmarkCollectionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97599AE11E28193D00BA15EF /* BookmarkCollectionController.swift */; }; 975B90FE1CEB909100D13906 /* iOSExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 975B90FD1CEB909100D13906 /* iOSExtensions.swift */; }; 9764CBD11D806AD800072D6A /* RefreshLibControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9764CBD01D806AD800072D6A /* RefreshLibControl.swift */; }; @@ -72,6 +71,7 @@ 9764F5991D833F2B00E0B1C4 /* KiwixURL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9764F5981D833F2B00E0B1C4 /* KiwixURL.swift */; }; 976B86D81DDA0C7E00FA7FD1 /* SearchContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 976B86D71DDA0C7E00FA7FD1 /* SearchContainer.swift */; }; 976C1DCB1E2FD5FC005EDEC4 /* TableOfContentsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 976C1DCA1E2FD5FC005EDEC4 /* TableOfContentsController.swift */; }; + 976C1DCE1E30000E005EDEC4 /* SettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 976C1DCD1E30000E005EDEC4 /* SettingsController.swift */; }; 9771A5BD1DD269BD005F1795 /* Book+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97D6813C1D6F712800E5FA99 /* Book+CoreDataProperties.swift */; }; 9779C3141D4575AD0064CC8E /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97E609F01D103DED00EBCB9D /* NotificationCenter.framework */; }; 9779C3171D4575AE0064CC8E /* TodayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9779C3161D4575AE0064CC8E /* TodayViewController.swift */; }; @@ -223,7 +223,6 @@ 9757C7491E10660B008A9469 /* DownloadManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DownloadManager.swift; sourceTree = ""; }; 9757C74B1E106958008A9469 /* BackgroundDownload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackgroundDownload.swift; sourceTree = ""; }; 97599AA11E26D3B000BA15EF /* BookmarkBooksController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookmarkBooksController.swift; sourceTree = ""; }; - 97599ADF1E28031A00BA15EF /* BookmarkSplitController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookmarkSplitController.swift; sourceTree = ""; }; 97599AE11E28193D00BA15EF /* BookmarkCollectionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookmarkCollectionController.swift; sourceTree = ""; }; 975B90FD1CEB909100D13906 /* iOSExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = iOSExtensions.swift; path = "Kiwix-iOS/iOSExtensions.swift"; sourceTree = SOURCE_ROOT; }; 9763275D1D64FE0F0034F120 /* BookDetailController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookDetailController.swift; sourceTree = ""; }; @@ -234,6 +233,7 @@ 976A0C801D41619C0006A742 /* DZNEmptyDataSet.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DZNEmptyDataSet.framework; path = "../../../../Users/chrisli/Library/Developer/Xcode/DerivedData/Kiwix-ayxrfhaqnfxzendihdolvkklkmhk/Build/Products/Debug-iphoneos/DZNEmptyDataSet/DZNEmptyDataSet.framework"; sourceTree = ""; }; 976B86D71DDA0C7E00FA7FD1 /* SearchContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchContainer.swift; sourceTree = ""; }; 976C1DCA1E2FD5FC005EDEC4 /* TableOfContentsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableOfContentsController.swift; sourceTree = ""; }; + 976C1DCD1E30000E005EDEC4 /* SettingsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsController.swift; sourceTree = ""; }; 9779C3131D4575AD0064CC8E /* Bookmarks.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Bookmarks.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 9779C3161D4575AE0064CC8E /* TodayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayViewController.swift; sourceTree = ""; }; 9779C31B1D4575AE0064CC8E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -272,7 +272,6 @@ 97C005D51D64B3B0004352E8 /* Library.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Library.storyboard; path = "Kiwix-iOS/Storyboard/Library.storyboard"; sourceTree = SOURCE_ROOT; }; 97C005D71D64B99E004352E8 /* LibrarySplitViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LibrarySplitViewController.swift; path = "Kiwix-iOS/Controller/Library/LibrarySplitViewController.swift"; sourceTree = SOURCE_ROOT; }; 97C005DB1D64BEFE004352E8 /* CloudBooksController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CloudBooksController.swift; sourceTree = ""; }; - 97C5BD4A1D9AF4B5009692CF /* BookmarkController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookmarkController.swift; sourceTree = ""; }; 97C601DB1D7F15C400362D4F /* Bookmark.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Bookmark.storyboard; sourceTree = ""; }; 97C601DD1D7F342100362D4F /* HTMLHeading.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTMLHeading.swift; sourceTree = ""; }; 97D0E9921DDA487E0029530E /* SearchBaseController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchBaseController.swift; sourceTree = ""; }; @@ -535,9 +534,7 @@ isa = PBXGroup; children = ( 97599AE11E28193D00BA15EF /* BookmarkCollectionController.swift */, - 97599ADF1E28031A00BA15EF /* BookmarkSplitController.swift */, 97599AA11E26D3B000BA15EF /* BookmarkBooksController.swift */, - 97C5BD4A1D9AF4B5009692CF /* BookmarkController.swift */, 97219DBC1D383A00009FDFF1 /* BookmarkHUD.swift */, ); path = Bookmark; @@ -588,7 +585,7 @@ name = Others; sourceTree = ""; }; - 9771DC4B1C37278E009ECFF0 /* Setting */ = { + 976C1DCC1E2FFFF3005EDEC4 /* old */ = { isa = PBXGroup; children = ( 970E7F761D9DBEA900741290 /* SettingController.swift */, @@ -596,6 +593,16 @@ 973DD4271D36E3E4009D45DB /* SettingDetailController.swift */, 970E7F781DA003FA00741290 /* WebViewControllerOld.swift */, ); + name = old; + sourceTree = ""; + }; + 9771DC4B1C37278E009ECFF0 /* Setting */ = { + isa = PBXGroup; + children = ( + 9787BC1F1D9318080030D311 /* Others */, + 976C1DCC1E2FFFF3005EDEC4 /* old */, + 976C1DCD1E30000E005EDEC4 /* SettingsController.swift */, + ); path = Setting; sourceTree = ""; }; @@ -625,7 +632,8 @@ 973A5C911DEA3F5600C7804C /* CoreDataTableBaseController.swift */, 970E7F7F1DA0305000741290 /* WelcomeController.swift */, ); - path = Others; + name = Others; + path = ../Others; sourceTree = ""; }; 978C587A1C1CCC9C0077AE47 /* Storyboards */ = { @@ -650,7 +658,6 @@ 972B007D1C35DBAB00B5FDC5 /* Main */, 97E108221C5D5A0D00E27FD3 /* Search */, 9771DC4B1C37278E009ECFF0 /* Setting */, - 9787BC1F1D9318080030D311 /* Others */, ); name = Controllers; path = Controller; @@ -1090,6 +1097,7 @@ 973207A51DD1984700EDD3DC /* SearchScopeAndHistoryController.swift in Sources */, 973207A21DD1983D00EDD3DC /* BookDetailController.swift in Sources */, 973208231DD19C7600EDD3DC /* DownloadProgress.swift in Sources */, + 976C1DCE1E30000E005EDEC4 /* SettingsController.swift in Sources */, 97A1FD161D6F71CE00A80EE2 /* DirectoryMonitor.swift in Sources */, 9726591D1D90A64600D1DFFB /* Notifications.swift in Sources */, 971A102C1D022AD5007FC62C /* BarButtonItems.swift in Sources */, @@ -1140,7 +1148,6 @@ 97A1FD191D6F71CE00A80EE2 /* ZimMultiReader.swift in Sources */, 97A1FD261D6F71E200A80EE2 /* ZimReader.mm in Sources */, 97A1FD1C1D6F71D800A80EE2 /* KiwixURLProtocol.swift in Sources */, - 97599AE01E28031A00BA15EF /* BookmarkSplitController.swift in Sources */, 97C2C26A1DDCC58500A9CC64 /* ArticleOperation.swift in Sources */, 973A5C991DEBC54800C7804C /* CloudKit.swift in Sources */, 973208261DD21E9C00EDD3DC /* CoreDataContainer.swift in Sources */,