Fix concurrency error
Future work: Make MastodonAuthentication immutable and Sendable.
This commit is contained in:
parent
75d80ff382
commit
16f7a86374
|
@ -23,13 +23,13 @@ extension HomeTimelineViewModel {
|
||||||
accountCreationDate: accountCreatedAt)
|
accountCreationDate: accountCreatedAt)
|
||||||
else { return }
|
else { return }
|
||||||
|
|
||||||
Task { @MainActor [weak self] in
|
|
||||||
guard let self else { return }
|
|
||||||
|
|
||||||
let seed = Mastodon.Entity.DonationCampaign.donationSeed(
|
let seed = Mastodon.Entity.DonationCampaign.donationSeed(
|
||||||
username: userAuthentication.username,
|
username: userAuthentication.username,
|
||||||
domain: userAuthentication.domain)
|
domain: userAuthentication.domain)
|
||||||
|
|
||||||
|
Task { @MainActor [weak self] in
|
||||||
|
guard let self else { return }
|
||||||
|
|
||||||
do {
|
do {
|
||||||
let campaign = try await self.context.apiService
|
let campaign = try await self.context.apiService
|
||||||
.getDonationCampaign(seed: seed, source: nil).value
|
.getDonationCampaign(seed: seed, source: nil).value
|
||||||
|
|
Loading…
Reference in New Issue