damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 9d209f485ce0f05b9c8a04a22d0bc43c1a0537f5
parent 1394122542b5258da1ffc8d2b0164bf8dfa3fe44
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 27 Apr 2023 13:04:46 -0700

Preserve order of bookmarks when saving

Changelog-Fixed: Preserve order of bookmarks when saving

Diffstat:
Mdamus/Models/BookmarksManager.swift | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/damus/Models/BookmarksManager.swift b/damus/Models/BookmarksManager.swift @@ -19,7 +19,7 @@ func load_bookmarks(pubkey: String) -> [NostrEvent] { } func save_bookmarks(pubkey: String, current_value: [NostrEvent], value: [NostrEvent]) -> Bool { - let uniq_bookmarks = Array(Set(value)) + let uniq_bookmarks = uniq(value) if uniq_bookmarks != current_value { let encoded = uniq_bookmarks.map(event_to_json)