Skip to content

Commit

Permalink
NMC 2157 - size lable upated after nextcloud 5.2.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
TSI-amrutwaghmare committed Apr 12, 2024
1 parent fa39e07 commit 275d878
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion iOSClient/Main/Collection Common/NCListCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class NCListCell: SwipeCollectionViewCell, UIGestureRecognizerDelegate, NCCellPr

func writeInfoDateSize(date: NSDate, size: Int64) {
labelInfo.text = NCUtility().dateDiff(date as Date)
labelSubinfo.text = " · " + NCUtilityFileSystem().transformedSize(size)
labelSubinfo.text = ""
}

func setAccessibility(label: String, value: String) {
Expand Down
16 changes: 11 additions & 5 deletions iOSClient/Select/NCSelect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ extension NCSelect: UICollectionViewDataSource {
if layoutForView?.layout == NCGlobal.shared.layoutList {

let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "listCell", for: indexPath) as! NCListCell
cell.delegate = self
cell.listCellDelegate = self

cell.fileObjectId = metadata.ocId
cell.fileUser = metadata.ownerId
Expand Down Expand Up @@ -464,6 +464,7 @@ extension NCSelect: UICollectionViewDataSource {
cell.imageItem.image = cell.imageItem.image?.colorizeFolder(metadata: metadata)

cell.labelInfo.text = utility.dateDiff(metadata.date as Date)
cell.labelSubinfo.text = " · " + utilityFileSystem.transformedSize(metadata.size)

} else {

Expand Down Expand Up @@ -522,7 +523,7 @@ extension NCSelect: UICollectionViewDataSource {
if layoutForView?.layout == NCGlobal.shared.layoutGrid {

let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "gridCell", for: indexPath) as! NCGridCell
cell.delegate = self
cell.gridCellDelegate = self

cell.fileObjectId = metadata.ocId
cell.fileUser = metadata.ownerId
Expand All @@ -537,7 +538,7 @@ extension NCSelect: UICollectionViewDataSource {
cell.imageItem.image = nil
cell.imageItem.backgroundColor = nil

cell.progressView.progress = 0.0
// cell.progressView.progress = 0.0

if metadata.directory {

Expand Down Expand Up @@ -597,9 +598,14 @@ extension NCSelect: UICollectionViewDataSource {
let (_, heightHeaderRichWorkspace, _) = getHeaderHeight(section: indexPath.section)

self.headerMenu = header
if layoutForView?.layout == NCGlobal.shared.layoutGrid {
header.setImageSwitchList()
header.setImageSwitchGrid()
header.buttonSwitch.accessibilityLabel = NSLocalizedString("_grid_view_", comment: "")
}

header.delegate = self
// header.setButtonsView(height: 0)
header.setButtonsView(height: 0)
header.setRichWorkspaceHeight(heightHeaderRichWorkspace)
header.setRichWorkspaceText(richWorkspaceText)
header.setViewTransfer(isHidden: true)
Expand Down Expand Up @@ -655,7 +661,7 @@ extension NCSelect: UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {

let (heightHeaderCommands, heightHeaderRichWorkspace, heightHeaderSection) = getHeaderHeight(section: section)
let heightHeader = heightHeaderCommands + heightHeaderRichWorkspace + heightHeaderSection
let heightHeader = typeOfCommandView == .copyMove ? 0 : heightHeaderCommands + heightHeaderRichWorkspace + heightHeaderSection

return CGSize(width: collectionView.frame.width, height: heightHeader)
}
Expand Down

0 comments on commit 275d878

Please sign in to comment.