Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOB-1785 - Fixed pull up UI #372

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ final class PullUpCollectionViewCell: BaseListCollectionViewCell {
@IBOutlet private weak var subtitleLabel: UILabel!
@IBOutlet private weak var subtitleImageView: UIImageView!
@IBOutlet private weak var chevronContainerView: UIView!
@IBOutlet private weak var trailingStackView: UIStackView!
@IBOutlet private weak var containerHeightConstraint: NSLayoutConstraint!
@IBOutlet private weak var actionButton: UDConfigurableButton!

Expand Down Expand Up @@ -110,6 +111,8 @@ extension PullUpCollectionViewCell {
actionButton.isHidden = true
chevronImageView.image = pullUpItem.disclosureIndicatorStyle.icon
}
trailingStackView.alignment = actionButton.isHidden ? .fill : .trailing
trailingStackView.isHidden = trailingStackView.arrangedSubviews.filter( { !$0.isHidden }).isEmpty

Task {
iconContainerView.image = await pullUpItem.icon
Expand Down Expand Up @@ -144,8 +147,10 @@ private extension PullUpCollectionViewCell {
#Preview {
let collectionView = PreviewCollectionViewCell<PullUpCollectionViewCell>(cellSize: CGSize(width: 390, height: 68),
configureCellCallback: { cell in
cell.setWith(pullUpItem: MessagingChatUserPullUpSelectionItem.init(userInfo: .init(wallet: "adasd"), isAdmin: false, isPending: false,
cell.setWith(pullUpItem: MessagingChatUserPullUpSelectionItem.init(userInfo: .init(wallet: "adasdsdf sd fsd fsdf sd fsd"), isAdmin: false, isPending: false,
unblockCallback: { }))
// cell.setWith(pullUpItem: WalletDetailsAddWalletAction.recoveryOrKey)
// cell.setWith(pullUpItem: ManageBackupsAction.restore)
})

return collectionView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
<outlet property="subtitleImageView" destination="EM1-AP-wbm" id="66c-l2-B1Y"/>
<outlet property="subtitleLabel" destination="LEY-Ba-zPc" id="FID-Ox-g2l"/>
<outlet property="titleLabel" destination="7JH-SK-m9W" id="D2D-88-0iL"/>
<outlet property="trailingStackView" destination="W9K-XZ-HCY" id="lrU-9f-FqG"/>
</connections>
<point key="canvasLocation" x="363.04347826086962" y="148.66071428571428"/>
</collectionViewCell>
Expand Down