-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix(HomeLastPicCollectionViewCell): Refresh during multi selection deselects all #1371
base: master
Are you sure you want to change the base?
Conversation
…e cell during its configuration
Quality Gate passedIssues Measures |
@@ -94,7 +99,8 @@ class HomeLastPicCollectionViewCell: UICollectionViewCell { | |||
contentInsetView.cornerRadius = UIConstants.cornerRadius | |||
} | |||
videoData.isHidden = !(file.uti.conforms(to: .video) || file.uti.conforms(to: .movie)) | |||
configureForSelection() | |||
|
|||
self.isSelected = isSelected |
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.
Setting it will call configureForSelection
on didSet
@@ -31,6 +31,10 @@ class HomeLastPicCollectionViewCell: UICollectionViewCell { | |||
private var thumbnailDownloadTask: Kingfisher.DownloadTask? | |||
|
|||
override var isSelected: Bool { | |||
willSet { | |||
// NOTE: DifferenceKit reset the selected flag mid air. Investigating | |||
print("•• isSelected changed: \(newValue) fid:\(file?.id)") |
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.
diffKit will set to false after the configuration of the cell, disabling it.
I'm still looking for an elegant fix.
Explicit the selected state of the cell during its configuration