Skip to content

Commit

Permalink
Merge pull request #1756 from planetary-social/bdm/183-list-order
Browse files Browse the repository at this point in the history
fixed: lists change positions randomly #183
  • Loading branch information
pelumy authored Feb 6, 2025
2 parents 5fb69eb + 107630b commit 95a969d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed: tapping a user on a list causes a crash. [#172](https://github.com/verse-pbc/issues/issues/172)
- Removed link to Listr.lol when list is empty. [#176](https://github.com/verse-pbc/issues/issues/176)
- Fixed: text fields sometimes don't work on onboarding screens. [#178](https://github.com/verse-pbc/issues/issues/178)
- Fixed: lists change positions randomly. [#183](https://github.com/verse-pbc/issues/issues/183)
- Fixed main action button is not visible on iPad on "Build Your Network" onboarding screen. [#184](https://github.com/verse-pbc/issues/issues/184)

### Internal Changes
Expand Down
6 changes: 1 addition & 5 deletions Nos/Controller/FeedController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,7 @@ import SwiftUI
.publisher
.receive(on: DispatchQueue.main)
.sink(receiveValue: { [weak self] lists in
// ensure that we only publish the most recent list for each replaceable identifier
let grouped = Dictionary(grouping: lists, by: { $0.replaceableIdentifier ?? "" })
self?.lists = grouped.compactMap { _, events in
events.max(by: { $0.createdAt ?? Date.distantPast < $1.createdAt ?? Date.distantPast })
}
self?.lists = lists
})
.store(in: &cancellables)
}
Expand Down

0 comments on commit 95a969d

Please sign in to comment.