Fix onboarding crash

This commit fixes a crash that occurred when clicking "follow all"
during onboarding.

This fix works by making `Contacts` and `PostBox` isolated into a
specific Swift Actor, and updating direct and indirect usages
accordingly.

Changelog-Fixed: Fixed a crash that occurred when clicking "follow all" during onboarding.
Closes: https://github.com/damus-io/damus/issues/3422
Co-authored-by: alltheseas <64376233+alltheseas@users.noreply.github.com>
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
Daniel D’Aquino
2026-01-05 15:57:20 -08:00
parent 368f94a209
commit 71c36052e2
31 changed files with 96 additions and 39 deletions

View File

@@ -18,6 +18,7 @@ final class EventGroupViewTests: XCTestCase {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
@MainActor
func testEventAuthorName() {
let damusState = test_damus_state
let damus_name = "17ldvg64:nq5mhr77"
@@ -26,6 +27,7 @@ final class EventGroupViewTests: XCTestCase {
XCTAssertEqual(event_author_name(profiles: damusState.profiles, pubkey: ANON_PUBKEY), "Anonymous")
}
@MainActor
func testEventGroupUniquePubkeys() {
let damusState = test_damus_state
@@ -48,6 +50,7 @@ final class EventGroupViewTests: XCTestCase {
XCTAssertEqual(event_group_unique_pubkeys(profiles: damusState.profiles, group: .repost(EventGroup(events: [repost1, repost2, repost3]))), [pk1, pk2, pk3])
}
@MainActor
func testReactingToText() throws {
let enUsLocale = Locale(identifier: "en-US")
let damusState = test_damus_state