@@ -68,7 +68,6 @@ class NCScan: UIViewController, NCScanCellCellDelegate {
6868 super. viewDidLoad ( )
6969
7070 view. backgroundColor = . secondarySystemGroupedBackground
71- // navigationController?.navigationBar.tintColor = NCBrandColor.shared.iconImageColor
7271 navigationItem. title = NSLocalizedString ( " _scanned_images_ " , comment: " " )
7372
7473 let interaction = UIEditMenuInteraction ( delegate: self )
@@ -146,7 +145,7 @@ class NCScan: UIViewController, NCScanCellCellDelegate {
146145 override var canBecomeFirstResponder : Bool { return true }
147146
148147 override func canPerformAction( _ action: Selector , withSender sender: Any ? ) -> Bool {
149- if action == #selector( pasteImage) {
148+ if action == #selector( pasteImage ( _ : ) ) {
150149 return true
151150 }
152151 return false
@@ -184,7 +183,7 @@ class NCScan: UIViewController, NCScanCellCellDelegate {
184183
185184 @IBAction func transferDown( sender: UIButton ) {
186185 for fileName in itemsSource where !itemsDestination. contains ( fileName) {
187- let fileNamePathAt = utilityFileSystem. directoryScan + " / " + fileName
186+ let fileNamePathAt = utilityFileSystem. createServerUrl ( serverUrl : utilityFileSystem . directoryScan, fileName : fileName)
188187 guard let data = try ? Data ( contentsOf: URL ( fileURLWithPath: fileNamePathAt) ) , let image = UIImage ( data: data) else { return }
189188
190189 imagesDestination. append ( image)
@@ -203,7 +202,7 @@ class NCScan: UIViewController, NCScanCellCellDelegate {
203202 break
204203 }
205204
206- NCKeychain ( ) . typeFilterScanDocument = filter
205+ NCPreferences ( ) . typeFilterScanDocument = filter
207206 collectionViewDestination. reloadData ( )
208207 }
209208
@@ -279,7 +278,7 @@ class NCScan: UIViewController, NCScanCellCellDelegate {
279278
280279 if collectionView === collectionViewDestination {
281280 let fileName = ( item. dragItem. localObject as? String ) !
282- let fileNamePathAt = utilityFileSystem. directoryScan + " / " + fileName
281+ let fileNamePathAt = utilityFileSystem. createServerUrl ( serverUrl : utilityFileSystem . directoryScan, fileName : fileName)
283282 guard let data = try ? Data ( contentsOf: URL ( fileURLWithPath: fileNamePathAt) ) , let image = UIImage ( data: data) else { return }
284283
285284 imagesDestination. insert ( image, at: indexPath. row)
@@ -333,7 +332,7 @@ class NCScan: UIViewController, NCScanCellCellDelegate {
333332 return collectionViewSource. reloadData ( )
334333 }
335334 let fileName = self . itemsSource [ index]
336- let fileNamePath = utilityFileSystem. directoryScan + " / " + fileName
335+ let fileNamePath = utilityFileSystem. createServerUrl ( serverUrl : utilityFileSystem . directoryScan, fileName : fileName)
337336 guard let data = try ? Data ( contentsOf: URL ( fileURLWithPath: fileNamePath) ) , let image = UIImage ( data: data) else {
338337 return collectionViewSource. reloadData ( )
339338 }
@@ -349,7 +348,7 @@ extension NCScan: EasyTipViewDelegate {
349348 if !self . database. tipExists ( NCGlobal . shared. tipScanAddImage) {
350349 var preferences = EasyTipView . Preferences ( )
351350 preferences. drawing. foregroundColor = . white
352- preferences. drawing. backgroundColor = NCBrandColor . shared . customer
351+ preferences. drawing. backgroundColor = . lightGray
353352 preferences. drawing. textAlignment = . left
354353 preferences. drawing. arrowPosition = . left
355354 preferences. drawing. cornerRadius = 10
@@ -360,9 +359,9 @@ extension NCScan: EasyTipViewDelegate {
360359 preferences. animating. showDuration = 1.5
361360 preferences. animating. dismissDuration = 1.5
362361
363- if tipView == nil {
362+ if tipView == nil , let view = self . view {
364363 tipView = EasyTipView ( text: NSLocalizedString ( " _tip_addcopyimage_ " , comment: " " ) , preferences: preferences, delegate: self )
365- tipView? . show ( forView: add, withinSuperview: self . view)
364+ tipView? . show ( forView: add, withinSuperview: view)
366365 }
367366 }
368367 }
@@ -385,7 +384,7 @@ extension NCScan: EasyTipViewDelegate {
385384extension NCScan : NCViewerQuickLookDelegate {
386385 func dismissQuickLook( fileNameSource: String , hasChangesQuickLook: Bool ) {
387386 let fileNameAtPath = NSTemporaryDirectory ( ) + fileNameSource
388- let fileNameToPath = utilityFileSystem. directoryScan + " / " + fileNameSource
387+ let fileNameToPath = utilityFileSystem. createServerUrl ( serverUrl : utilityFileSystem . directoryScan, fileName : fileNameSource)
389388 utilityFileSystem. copyFile ( atPath: fileNameAtPath, toPath: fileNameToPath)
390389 guard let data = try ? Data ( contentsOf: URL ( fileURLWithPath: fileNameToPath) ) , let image = UIImage ( data: data) else { return }
391390 var index = 0
0 commit comments