mirror of
https://github.com/mastodon/mastodon-ios
synced 2025-04-11 22:58:02 +02:00
31 lines
817 B
Swift
31 lines
817 B
Swift
//
|
|
// ProfileCardTableViewCell+Configuration.swift
|
|
//
|
|
//
|
|
// Created by MainasuK on 2022-4-19.
|
|
//
|
|
|
|
import UIKit
|
|
import CoreDataStack
|
|
import MastodonSDK
|
|
|
|
extension ProfileCardTableViewCell {
|
|
|
|
public func configure(
|
|
tableView: UITableView,
|
|
user: MastodonUser,
|
|
profileCardTableViewCellDelegate: ProfileCardTableViewCellDelegate?
|
|
) {
|
|
if profileCardView.frame == .zero {
|
|
// set content view width
|
|
assert(layoutMarginsGuide.layoutFrame.width > .zero)
|
|
shadowBackgroundContainer.frame.size.width = layoutMarginsGuide.layoutFrame.width
|
|
profileCardView.setupLayoutFrame(layoutMarginsGuide.layoutFrame)
|
|
}
|
|
|
|
profileCardView.configure(user: user)
|
|
delegate = profileCardTableViewCellDelegate
|
|
}
|
|
|
|
}
|