Fix pinned stats display issues
This commit is contained in:
parent
2f42a73b9a
commit
8b6a521db1
|
@ -33,8 +33,12 @@ public class ProfileViewModel: StatusListViewModel {
|
||||||
// so a diffable data source can potentially render it in both sections
|
// so a diffable data source can potentially render it in both sections
|
||||||
super.collectionItems
|
super.collectionItems
|
||||||
.map {
|
.map {
|
||||||
$0.enumerated().map {
|
$0.enumerated().map { [weak self] in
|
||||||
$0 == 0 ? $1.map { .init(id: $0.id, kind: $0.kind, info: [.pinned: true]) } : $1
|
if let self = self, self.collection == .statuses, $0 == 0 {
|
||||||
|
return $1.map { .init(id: $0.id, kind: $0.kind, info: [.pinned: true]) }
|
||||||
|
} else {
|
||||||
|
return $1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.eraseToAnyPublisher()
|
.eraseToAnyPublisher()
|
||||||
|
|
Loading…
Reference in New Issue