Skip to content

Commit

Permalink
redacte title and subtitle in spaces views
Browse files Browse the repository at this point in the history
  • Loading branch information
hosy committed Jan 21, 2025
1 parent d3287bf commit aa86369
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ class DriveGridCell: DriveHeaderCell {

override var title: String? {
didSet {
accessibilityLabel = title
accessibilityLabel = title?.redacted()
}
}

override var subtitle: String? {
didSet {
subtitleLabel.text = subtitle ?? " " // Ensure the grid cells' titles align by always showing a subtitle - if necessary, an empty one
accessibilityHint = subtitle
subtitleLabel.text = subtitle?.redacted() ?? " " // Ensure the grid cells' titles align by always showing a subtitle - if necessary, an empty one
accessibilityHint = subtitle?.redacted()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ class DriveListCell: ThemeableCollectionViewListCell {

var title : String? {
didSet {
titleLabel.text = title
titleLabel.text = title?.redacted()
}
}
var subtitle : String? {
didSet {
subtitleLabel.text = subtitle
subtitleLabel.text = subtitle?.redacted()
}
}

Expand Down Expand Up @@ -153,8 +153,8 @@ extension DriveListCell {

collectionItemRef.ocCellConfiguration?.configureCell(for: collectionItemRef, with: { itemRecord, item, cellConfiguration in
if let presentable = OCDataRenderer.default.renderItem(item, asType: .presentable, error: nil, withOptions: nil) as? OCDataItemPresentable {
title = presentable.title
subtitle = presentable.subtitle
title = presentable.title?.redacted()
subtitle = presentable.subtitle?.redacted()

resourceManager = cellConfiguration.core?.vault.resourceManager

Expand Down
6 changes: 3 additions & 3 deletions ownCloudAppShared/User Interface/More/MoreViewHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ open class MoreViewHeader: UIView {
}
}

titleLabel.attributedText = NSAttributedString(string: itemName ?? "", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 17, weight: .semibold)])
titleLabel.attributedText = NSAttributedString(string: itemName?.redacted() ?? "", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 17, weight: .semibold)])

let byteCountFormatter = ByteCountFormatter()
byteCountFormatter.countStyle = .file
Expand All @@ -227,8 +227,8 @@ open class MoreViewHeader: UIView {
}

public func updateHeader(title: String, subtitle: String) {
titleLabel.text = title
detailLabel.text = subtitle
titleLabel.text = title.redacted()
detailLabel.text = subtitle.redacted()
}

public required init?(coder aDecoder: NSCoder) {
Expand Down

0 comments on commit aa86369

Please sign in to comment.