Skip to content

Commit

Permalink
- Made the detail font size match the proposed design.
Browse files Browse the repository at this point in the history
- Now the detail label in the MoreHeaderView shows the last modified date of an OCItem.
  • Loading branch information
Pablo Carrascal committed Aug 22, 2018
1 parent 960fd88 commit c24441d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ownCloud/Client/Actions/MoreViewHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,18 @@ class MoreViewHeader: UIView {
let bcf = ByteCountFormatter()
bcf.countStyle = .file
let size = bcf.string(fromByteCount: Int64(item.size))
detailLabel.attributedText = NSAttributedString(string: size, attributes: [NSAttributedStringKey.font: UIFont.systemFont(ofSize: 17, weight: .semibold)])

let dateFormatter = DateFormatter()
dateFormatter.timeStyle = .none
dateFormatter.dateStyle = .medium
dateFormatter.locale = Locale.current
dateFormatter.doesRelativeDateFormatting = true

let dateString = dateFormatter.string(from: item.lastModified)

let detail = size + " - " + dateString

detailLabel.attributedText = NSAttributedString(string: detail, attributes: [NSAttributedStringKey.font: UIFont.systemFont(ofSize: 14, weight: .regular)])

self.iconView.image = item.icon(fitInSize: CGSize(width: 40, height: 40))

Expand Down

0 comments on commit c24441d

Please sign in to comment.