additional collectionview work

This commit is contained in:
Stuart Breckenridge committed 2026-01-24 23:07:06 +08:00
1 parent 3836d08b11
commit 442b4c0219
4 files changed
+175 -155

No files matched your search

@@ -197,7 +197,9 @@ class MainTimelineCollectionViewCell: UICollectionViewCell {
}
func titleTextColor(for state: UICellConfigurationState) -> UIColor {
if state.isSelected {
if state.isSwiped {
return .label
} else if state.isSelected {
return .white
} else {
return .label
@@ -232,10 +234,6 @@ class MainTimelineCollectionViewCell: UICollectionViewCell {
var backgroundConfig = UIBackgroundConfiguration.listCell().updated(for: state)
backgroundConfig.cornerRadius = 20
if traitCollection.userInterfaceIdiom == .pad {
backgroundConfig.edgesAddingLayoutMarginsToBackgroundInsets = [.leading, .trailing]
backgroundConfig.backgroundInsets = NSDirectionalEdgeInsets(top: 0, leading: !isPreview ? -4 : -12, bottom: 0, trailing: !isPreview ? -4 : -12)
}
if state.isSwiped {
backgroundConfig.backgroundColor = .secondarySystemFill