mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-04-24 04:05:16 +08:00
fix label and people selection states (#1995)
This commit is contained in:
@@ -28,13 +28,13 @@ final class LabelSectionController: ListSwiftSectionController<RepositoryLabel>
|
||||
height: Styles.Sizes.tableCellHeightLarge
|
||||
)
|
||||
},
|
||||
configure: { [selected] in
|
||||
configure: { [weak self] in
|
||||
let color = $1.value.color.color
|
||||
$0.button.setTitleColor(color.textOverlayColor, for: .normal)
|
||||
$0.button.backgroundColor = color
|
||||
$0.button.setTitle($1.value.name, for: .normal)
|
||||
|
||||
$0.setSelected(selected)
|
||||
$0.setSelected(self?.selected == true)
|
||||
},
|
||||
didSelect: { [weak self] context in
|
||||
guard let strongSelf = self else { return }
|
||||
|
||||
@@ -34,8 +34,12 @@ final class PeopleSectionController: ListSwiftSectionController<IssueAssigneeVie
|
||||
height: Styles.Sizes.tableCellHeightLarge
|
||||
)
|
||||
},
|
||||
configure: { [selected] in
|
||||
$0.configure(avatarURL: $1.value.avatarURL, username: $1.value.login, showCheckmark: selected)
|
||||
configure: { [weak self] in
|
||||
$0.configure(
|
||||
avatarURL: $1.value.avatarURL,
|
||||
username: $1.value.login,
|
||||
showCheckmark: self?.selected == true
|
||||
)
|
||||
},
|
||||
didSelect: { [weak self] context in
|
||||
guard let strongSelf = self else { return }
|
||||
|
||||
Reference in New Issue
Block a user