Skip to content

Commit

Permalink
Fix wording Feed expert home cell actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mjdevs committed Apr 1, 2021
1 parent 9892801 commit 6394473
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
10 changes: 2 additions & 8 deletions Shared/Classes/Controller/Home/OTHomeCollectionViewCells.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class OTHomeCollectionViewCell: UICollectionViewCell {
self.contentView.layer.masksToBounds = true
}

func updateCell(item:OTEntourage,delegate:CellClickDelegate?, isHeadline:Bool) {
func updateCell(item:OTEntourage,delegate:CellClickDelegate?) {
self.delegate = delegate
self.item = item
if item.groupType == "outing" {
Expand All @@ -52,18 +52,12 @@ class OTHomeCollectionViewCell: UICollectionViewCell {

if item.entourage_type == "contribution" {
ui_title_action.textColor = UIColor.appBlue()
ui_info_action_by.text = OTLocalisationService.getLocalizedValue(forKey: "home_action_contrib_info_user")
}
else {
ui_title_action.textColor = UIColor.appOrange()
}

if isHeadline {
ui_info_action_by.text = OTLocalisationService.getLocalizedValue(forKey: "home_action_info_user")
}
else {
ui_info_action_by.text = OTLocalisationService.getLocalizedValue(forKey: "home_action_contrib_info_user")
}

}

ui_title_description.text = item.title
Expand Down
4 changes: 2 additions & 2 deletions Shared/Classes/Controller/Home/OTHomeTableViewCells.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ extension OTHomeCellCollectionView: UICollectionViewDataSource,UICollectionViewD
let item = cards.arrayCards[indexPath.row]
if let item = item as? OTEntourage {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cellColl", for: indexPath) as! OTHomeCollectionViewCell
cell.updateCell(item: item,delegate: delegate,isHeadline: true)
cell.updateCell(item: item,delegate: delegate)
return cell
}
else if let item = item as? OTAnnouncement {
Expand Down Expand Up @@ -176,7 +176,7 @@ extension OTHomeCellCollectionView: UICollectionViewDataSource,UICollectionViewD
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cellColl", for: indexPath) as! OTHomeCollectionViewCell

if let _entourage = cards.arrayCards[indexPath.row] as? OTEntourage {
cell.updateCell(item: _entourage,delegate: delegate,isHeadline: false)
cell.updateCell(item: _entourage,delegate: delegate)
}

return cell
Expand Down

0 comments on commit 6394473

Please sign in to comment.