mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 09:41:00 +00:00
Fix pinned stats display issues
This commit is contained in:
parent
2f42a73b9a
commit
8b6a521db1
1 changed files with 6 additions and 2 deletions
|
@ -33,8 +33,12 @@ public class ProfileViewModel: StatusListViewModel {
|
|||
// so a diffable data source can potentially render it in both sections
|
||||
super.collectionItems
|
||||
.map {
|
||||
$0.enumerated().map {
|
||||
$0 == 0 ? $1.map { .init(id: $0.id, kind: $0.kind, info: [.pinned: true]) } : $1
|
||||
$0.enumerated().map { [weak self] in
|
||||
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()
|
||||
|
|
Loading…
Reference in a new issue