diff --git a/iOSClient/Activity/NCActivity.swift b/iOSClient/Activity/NCActivity.swift index 2e446ac16b..ad1f021f44 100644 --- a/iOSClient/Activity/NCActivity.swift +++ b/iOSClient/Activity/NCActivity.swift @@ -25,6 +25,7 @@ import UIKit import SwiftRichString import NextcloudKit +import SVGKit class NCActivity: UIViewController, NCSharePagingContent { @IBOutlet weak var viewContainerConstraint: NSLayoutConstraint! @@ -150,10 +151,6 @@ extension NCActivity: UITableViewDelegate { return 50 } - func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { - return 80 - } - func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { let view = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.width, height: 50)) view.backgroundColor = .clear @@ -223,7 +220,6 @@ extension NCActivity: UITableViewDataSource { cell.indexPath = indexPath cell.tableComments = comment cell.delegate = self - cell.sizeToFit() // Image let fileName = NCSession.shared.getFileName(urlBase: metadata.urlBase, user: comment.actorId) @@ -233,7 +229,7 @@ extension NCActivity: UITableViewDataSource { cell.labelUser.textColor = NCBrandColor.shared.textColor // Date cell.labelDate.text = utility.dateDiff(comment.creationDateTime as Date) - cell.labelDate.textColor = .systemGray4 + cell.labelDate.textColor = .lightGray // Message cell.labelMessage.text = comment.message cell.labelMessage.textColor = NCBrandColor.shared.textColor @@ -244,6 +240,8 @@ extension NCActivity: UITableViewDataSource { cell.buttonMenu.isHidden = true } + cell.sizeToFit() + return cell } @@ -264,11 +262,14 @@ extension NCActivity: UITableViewDataSource { // icon if !activity.icon.isEmpty { + activity.icon = activity.icon.replacingOccurrences(of: ".png", with: ".svg") let fileNameIcon = (activity.icon as NSString).lastPathComponent let fileNameLocalPath = utilityFileSystem.directoryUserData + "/" + fileNameIcon if FileManager.default.fileExists(atPath: fileNameLocalPath) { - if let image = UIImage(contentsOfFile: fileNameLocalPath) { + let image = fileNameIcon.contains(".svg") ? SVGKImage(contentsOfFile: fileNameLocalPath)?.uiImage : UIImage(contentsOfFile: fileNameLocalPath) + + if let image { cell.icon.image = image.withTintColor(NCBrandColor.shared.textColor, renderingMode: .alwaysOriginal) } } else { diff --git a/iOSClient/Networking/NCService.swift b/iOSClient/Networking/NCService.swift index 057c04179c..a1b9633d3d 100644 --- a/iOSClient/Networking/NCService.swift +++ b/iOSClient/Networking/NCService.swift @@ -22,7 +22,6 @@ // import UIKit -import SVGKit import NextcloudKit import RealmSwift diff --git a/iOSClient/Share/Advanced/NCShareNewUserAddComment.swift b/iOSClient/Share/Advanced/NCShareNewUserAddComment.swift index a4bd06855f..7d76452141 100644 --- a/iOSClient/Share/Advanced/NCShareNewUserAddComment.swift +++ b/iOSClient/Share/Advanced/NCShareNewUserAddComment.swift @@ -21,7 +21,6 @@ import UIKit import NextcloudKit -import SVGKit class NCShareNewUserAddComment: UIViewController, NCShareDetail { diff --git a/iOSClient/Share/NCShareCommentsCell.xib b/iOSClient/Share/NCShareCommentsCell.xib index cceef5a118..243aa83341 100755 --- a/iOSClient/Share/NCShareCommentsCell.xib +++ b/iOSClient/Share/NCShareCommentsCell.xib @@ -1,9 +1,9 @@ - + - + @@ -11,11 +11,11 @@ - - + + - + @@ -26,11 +26,11 @@ @@ -53,8 +53,8 @@ - @@ -93,7 +94,7 @@ - + @@ -102,10 +103,10 @@ - + - +