diff --git a/Zotero/Scenes/Detail/PDF/Models/PDFReaderState.swift b/Zotero/Scenes/Detail/PDF/Models/PDFReaderState.swift index 2921c12ea..aa60028c4 100644 --- a/Zotero/Scenes/Detail/PDF/Models/PDFReaderState.swift +++ b/Zotero/Scenes/Detail/PDF/Models/PDFReaderState.swift @@ -68,7 +68,7 @@ struct PDFReaderState: ViewModelState { let key: String let parentKey: String? let document: PSPDFKit.Document - let activityTitle: String? + let title: String? let previewCache: NSCache let textFont: UIFont let commentFont: UIFont @@ -133,7 +133,7 @@ struct PDFReaderState: ViewModelState { url: URL, key: String, parentKey: String?, - activityTitle: String?, + title: String?, libraryId: LibraryIdentifier, initialPage: Int?, preselectedAnnotationKey: String?, @@ -148,7 +148,7 @@ struct PDFReaderState: ViewModelState { self.parentKey = parentKey self.document = Document(url: url) document.overrideClass(PSPDFKit.AnnotationManager.self, with: AnnotationManager.self) - self.activityTitle = activityTitle + self.title = title self.previewCache = NSCache() self.textFont = PDFReaderLayout.annotationLayout.font self.commentFont = PDFReaderLayout.annotationLayout.font diff --git a/Zotero/Scenes/Detail/PDF/PDFCoordinator.swift b/Zotero/Scenes/Detail/PDF/PDFCoordinator.swift index 386d09536..29f5b7fe1 100644 --- a/Zotero/Scenes/Detail/PDF/PDFCoordinator.swift +++ b/Zotero/Scenes/Detail/PDF/PDFCoordinator.swift @@ -135,7 +135,7 @@ final class PDFCoordinator: Coordinator { url: self.url, key: self.key, parentKey: self.parentKey, - activityTitle: try? controllers.userControllers?.dbStorage.perform(request: ReadFilenameDbRequest(libraryId: libraryId, key: key), on: .main), + title: try? controllers.userControllers?.dbStorage.perform(request: ReadFilenameDbRequest(libraryId: libraryId, key: key), on: .main), libraryId: self.libraryId, initialPage: self.page, preselectedAnnotationKey: self.preselectedAnnotationKey, diff --git a/Zotero/Scenes/Detail/PDF/Views/PDFReaderViewController.swift b/Zotero/Scenes/Detail/PDF/Views/PDFReaderViewController.swift index e492d6c57..b2dfa6ef7 100644 --- a/Zotero/Scenes/Detail/PDF/Views/PDFReaderViewController.swift +++ b/Zotero/Scenes/Detail/PDF/Views/PDFReaderViewController.swift @@ -123,7 +123,7 @@ class PDFReaderViewController: UIViewController { if changedCurrentItem { close(dismiss: false) } else if openItemsChanged { - openItemsController.setOpenItemsUserActivity(from: self, libraryId: viewModel.state.library.identifier, title: viewModel.state.activityTitle) + openItemsController.setOpenItemsUserActivity(from: self, libraryId: viewModel.state.library.identifier, title: viewModel.state.title) } } ) @@ -233,7 +233,7 @@ class PDFReaderViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - openItemsController.setOpenItemsUserActivity(from: self, libraryId: viewModel.state.library.identifier, title: viewModel.state.activityTitle) + openItemsController.setOpenItemsUserActivity(from: self, libraryId: viewModel.state.library.identifier, title: viewModel.state.title) view.backgroundColor = .systemGray6 // Create intraDocumentNavigationHandler before setting up views, as it may be called by a child view controller, before view has finished loading. intraDocumentNavigationHandler = IntraDocumentNavigationButtonsHandler(