Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: lists change positions randomly #183 in release/1.1.1 #1759

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)

### Internal Changes
- Added function for creating a new list and a test verifying list editing. [#112](https://github.com/verse-pbc/issues/issues/112)
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