-
Notifications
You must be signed in to change notification settings - Fork 0
Disable comment section #2
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
base: main
Are you sure you want to change the base?
Conversation
Sources/WishKit/View/WishCell.swift
Outdated
| private let descriptionLabel = UILabel(font: .systemFont(ofSize: 13), lineCount: WishKit.config.expandDescriptionInList ? 0 : 1) | ||
| private var descriptionLabel = UILabel(font: .systemFont(ofSize: 13), lineCount: WishKit.config.expandDescriptionInList ? 0 : 1) | ||
|
|
||
| public var isExpanded = WishKit.config.expandDescriptionInList { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be a stored property or can it be computed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Boolean can be toggled to expand/shrink the WishCell by tapping on it. So I don't think it can be computed.
# Conflicts: # Sources/WishKit/Controller/WishListVC.swift # Sources/WishKit/View/WishCell.swift # Sources/WishKit/ViewModel/WishListVM.swift
…for WishView expansion
| .multilineTextAlignment(.leading) | ||
| .lineLimit(descriptionLineLimit) | ||
| // By changing the id, the view is identified as a new view and we avoid the weird text animation. | ||
| .id(descriptionLineLimit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But don't you now have multiple views with the same ID in the hierarchy? Won't that be a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be okay to generate a new UUID() instead or should I create a unique id myself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Text + line limit? Then the ID wouldn't change every time body is reevaluated.
No description provided.