Skip to content

Commit

Permalink
images
Browse files Browse the repository at this point in the history
Signed-off-by: Marino Faggiana <[email protected]>
  • Loading branch information
marinofaggiana committed May 20, 2024
1 parent e458015 commit 2c13172
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 76 deletions.
15 changes: 0 additions & 15 deletions iOSClient/Images.xcassets/noPreview.imageset/Contents.json

This file was deleted.

Binary file not shown.
15 changes: 0 additions & 15 deletions iOSClient/Images.xcassets/noPreviewAudio.imageset/Contents.json

This file was deleted.

Binary file not shown.
15 changes: 0 additions & 15 deletions iOSClient/Images.xcassets/noPreviewVideo.imageset/Contents.json

This file was deleted.

Binary file not shown.
26 changes: 0 additions & 26 deletions iOSClient/Images.xcassets/notaMusic.imageset/Contents.json

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions iOSClient/Utility/NCUtility+Image.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ extension NCUtility {
}

if metadata.isVideo {
return UIImage(named: "noPreviewVideo")?.image(color: NCBrandColor.shared.iconImageColor2, size: size)
return loadImage(named: "video", colors: [NCBrandColor.shared.iconImageColor2])
} else if metadata.isAudio {
return UIImage(named: "noPreviewAudio")?.image(color: NCBrandColor.shared.iconImageColor2, size: size)
return loadImage(named: "waveform", colors: [NCBrandColor.shared.iconImageColor2])
} else {
return UIImage(named: "noPreview")?.image(color: NCBrandColor.shared.iconImageColor2, size: size)
return loadImage(named: "photo", colors: [NCBrandColor.shared.iconImageColor2])
}
}

Expand Down
4 changes: 2 additions & 2 deletions iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class NCViewerMedia: UIViewController {
if metadata.isVideo && !metadata.hasPreview {
utility.createImageFrom(fileNameView: metadata.fileNameView, ocId: metadata.ocId, etag: metadata.etag, classFile: metadata.classFile)
} else if metadata.isAudio {
return completion(UIImage(named: "noPreviewAudio")!.image(color: NCBrandColor.shared.iconImageColor2, size: view.frame.width))
return completion(utility.loadImage(named: "waveform", colors: [NCBrandColor.shared.iconImageColor2]))
} else if let image = utility.getImage(metadata: metadata) {
return completion(image)
}
Expand All @@ -317,7 +317,7 @@ class NCViewerMedia: UIViewController {
NCManageDatabase.shared.setMetadataEtagResource(ocId: self.metadata.ocId, etagResource: etag)
return completion(image)
} else {
return completion(UIImage(named: "noPreview")!.image(color: NCBrandColor.shared.iconImageColor2, size: self.view.frame.width))
return completion(self.utility.loadImage(named: "photo", colors: [NCBrandColor.shared.iconImageColor2]))
}
}
}
Expand Down

0 comments on commit 2c13172

Please sign in to comment.