Skip to content

Commit 265c61c

Browse files
committed
WIP
Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
1 parent d883e9b commit 265c61c

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

Share/NCShareCell.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,14 @@ class NCShareCell: UITableViewCell {
4242
imageCell.contentMode = .scaleAspectFit
4343
}
4444

45-
setFilename(fileName)
45+
setBidiSafeFilename(fileName, isDirectory: false, titleLabel: fileNameCell, extensionLabel: fileNameExtensionCell)
4646

4747
let fileSize = utilityFileSystem.getFileSize(filePath: (NSTemporaryDirectory() + fileName))
4848
sizeCell?.text = utilityFileSystem.transformedSize(fileSize)
4949

5050
moreButton?.setImage(NCImageCache.shared.getImageButtonMore(), for: .normal)
5151
}
5252

53-
func setFilename(_ filename: String) {
54-
setBidiSafeFilename(filename, isDirectory: false, titleLabel: fileNameCell, extensionLabel: fileNameExtensionCell)
55-
}
56-
5753
@IBAction func buttonTapped(_ sender: Any) {
5854
let nsName = fileName as NSString
5955
let ext = nsName.pathExtension

iOSClient/Share/NCShareHeader.swift

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ class NCShareHeader: UIView {
5555
fileNameTopConstraint.constant -= 45
5656
}
5757

58-
setFilename(metadata.fileNameView, isDirectory: metadata.directory)
58+
fileName?.numberOfLines = 1
59+
fileNameExtension?.numberOfLines = 1
60+
setBidiSafeFilename(metadata.fileNameView, isDirectory: metadata.directory, titleLabel: fileName, extensionLabel: fileNameExtension)
61+
5962
fileName.textColor = NCBrandColor.shared.textColor
6063
fileNameExtension?.textColor = NCBrandColor.shared.textColor
6164
info.textColor = NCBrandColor.shared.textColor2
@@ -67,12 +70,6 @@ class NCShareHeader: UIView {
6770
layoutIfNeeded()
6871
}
6972

70-
func setFilename(_ filename: String, isDirectory: Bool) {
71-
fileName?.numberOfLines = 1
72-
fileNameExtension?.numberOfLines = 1
73-
setBidiSafeFilename(filename, isDirectory: isDirectory, titleLabel: fileName, extensionLabel: fileNameExtension)
74-
}
75-
7673
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
7774
if fullWidthImageView.image != nil {
7875
imageView.isHidden = traitCollection.verticalSizeClass != .compact

0 commit comments

Comments
 (0)