diff options
author | marinofaggiana <ios@nextcloud.com> | 2022-08-02 18:27:48 +0300 |
---|---|---|
committer | marinofaggiana <ios@nextcloud.com> | 2022-08-02 18:27:48 +0300 |
commit | 5a5db058a4611f55fc1ddc550dc1dae6df75da21 (patch) | |
tree | 3780d5264e82868c8d650877cbb41867818baa1b /iOSClient | |
parent | 50c0265d7a26d79af217bf7336cb0d3aa9309aca (diff) |
clear code
Signed-off-by: marinofaggiana <ios@nextcloud.com>
Diffstat (limited to 'iOSClient')
-rw-r--r-- | iOSClient/AppDelegate.swift | 1 | ||||
-rw-r--r-- | iOSClient/Files/NCFiles.swift | 1 | ||||
-rw-r--r-- | iOSClient/Main/Collection Common/NCCollectionViewCommon.swift | 3 | ||||
-rw-r--r-- | iOSClient/RichWorkspace/NCViewerRichWorkspace.swift | 7 |
4 files changed, 6 insertions, 6 deletions
diff --git a/iOSClient/AppDelegate.swift b/iOSClient/AppDelegate.swift index c8c563f55..09de6068a 100644 --- a/iOSClient/AppDelegate.swift +++ b/iOSClient/AppDelegate.swift @@ -42,7 +42,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD var deletePasswordSession: Bool = false var activeAppConfigView: NCAppConfigView? - var activeFiles: NCFiles? var activeLogin: NCLogin? var activeLoginWeb: NCLoginWeb? @objc var activeMedia: NCMedia? diff --git a/iOSClient/Files/NCFiles.swift b/iOSClient/Files/NCFiles.swift index 62fcbabce..40948b4de 100644 --- a/iOSClient/Files/NCFiles.swift +++ b/iOSClient/Files/NCFiles.swift @@ -34,7 +34,6 @@ class NCFiles: NCCollectionViewCommon { required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) - appDelegate.activeFiles = self titleCurrentFolder = NCBrandOptions.shared.brand layoutKey = NCGlobal.shared.layoutViewFiles enableSearchBar = true diff --git a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift index 6eb38f773..c76d90dcc 100644 --- a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift +++ b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift @@ -883,7 +883,8 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS if let viewerRichWorkspace = navigationController.topViewController as? NCViewerRichWorkspace { viewerRichWorkspace.richWorkspaceText = richWorkspaceText ?? "" viewerRichWorkspace.serverUrl = serverUrl - + viewerRichWorkspace.delegate = self + navigationController.modalPresentationStyle = .fullScreen self.present(navigationController, animated: true, completion: nil) } diff --git a/iOSClient/RichWorkspace/NCViewerRichWorkspace.swift b/iOSClient/RichWorkspace/NCViewerRichWorkspace.swift index fa4d104dc..652005b76 100644 --- a/iOSClient/RichWorkspace/NCViewerRichWorkspace.swift +++ b/iOSClient/RichWorkspace/NCViewerRichWorkspace.swift @@ -34,8 +34,9 @@ import MarkdownKit private var markdownParser = MarkdownParser() private var textViewColor: UIColor? - @objc public var richWorkspaceText: String = "" - @objc public var serverUrl: String = "" + var richWorkspaceText: String = "" + var serverUrl: String = "" + var delegate: NCCollectionViewCommon? // MARK: - View Life Cycle @@ -66,7 +67,7 @@ import MarkdownKit guard let metadata = metadata else { return } NCManageDatabase.shared.setDirectory(serverUrl: self.serverUrl, richWorkspace: metadata.richWorkspace, account: account) if self.richWorkspaceText != metadata.richWorkspace && metadata.richWorkspace != nil { - self.appDelegate.activeFiles?.richWorkspaceText = self.richWorkspaceText + self.delegate?.richWorkspaceText = self.richWorkspaceText self.richWorkspaceText = metadata.richWorkspace! DispatchQueue.main.async { self.textView.attributedText = self.markdownParser.parse(metadata.richWorkspace!) |