Skip to content

Commit

Permalink
Fix concurrency error
Browse files Browse the repository at this point in the history
Future work: Make MastodonAuthentication immutable and Sendable.
  • Loading branch information
whattherestimefor committed Nov 13, 2024
1 parent 75d80ff commit 16f7a86
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ extension HomeTimelineViewModel {
accountCreationDate: accountCreatedAt)
else { return }

let seed = Mastodon.Entity.DonationCampaign.donationSeed(
username: userAuthentication.username,
domain: userAuthentication.domain)

Task { @MainActor [weak self] in
guard let self else { return }

let seed = Mastodon.Entity.DonationCampaign.donationSeed(
username: userAuthentication.username,
domain: userAuthentication.domain)

do {
let campaign = try await self.context.apiService
.getDonationCampaign(seed: seed, source: nil).value
Expand Down

0 comments on commit 16f7a86

Please sign in to comment.