2022-04-19 14:57:21 +02:00
//
// P r o f i l e C a r d T a b l e V i e w C e l l + C o n f i g u r a t i o n . s w i f t
//
//
// C r e a t e d b y M a i n a s u K o n 2 0 2 2 - 4 - 1 9 .
//
import UIKit
import CoreDataStack
2022-05-16 13:42:03 +02:00
import MastodonSDK
2022-04-19 14:57:21 +02:00
extension ProfileCardTableViewCell {
public func configure (
tableView : UITableView ,
user : MastodonUser ,
profileCardTableViewCellDelegate : ProfileCardTableViewCellDelegate ?
) {
if profileCardView . frame = = . zero {
// s e t c o n t e n t v i e w w i d t h
assert ( layoutMarginsGuide . layoutFrame . width > . zero )
shadowBackgroundContainer . frame . size . width = layoutMarginsGuide . layoutFrame . width
profileCardView . setupLayoutFrame ( layoutMarginsGuide . layoutFrame )
logger . log ( level : . debug , " \( ( #file as NSString ) . lastPathComponent , privacy : . public ) [ \( #line , privacy : . public ) ], \( #function , privacy : . public ) : did layout for new cell " )
}
profileCardView . configure ( user : user )
delegate = profileCardTableViewCellDelegate
}
}