Skip to content

Commit c25cb86

Browse files
committed
Replace newer Task.sleep method
The previous one is used only for iOS 16 or later. It's replaced with the one used for iOS versions earlier than this.
1 parent b6349b5 commit c25cb86

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/ATProtoKit/APIReference/ATProtoBlueskyAPI/ListItemRecord/CreateListItemRecord.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extension ATProtoBluesky {
8585
swapCommit: swapCommit ?? nil
8686
)
8787

88-
try await Task.sleep(for: .seconds(0.5))
88+
try await Task.sleep(nanoseconds: 500_000_000)
8989

9090
return record
9191
} catch {

Sources/ATProtoKit/APIReference/ATProtoBlueskyAPI/ListRecord/CreateListRecord.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ extension ATProtoBluesky {
149149
swapCommit: swapCommit ?? nil
150150
)
151151

152-
try await Task.sleep(for: .seconds(0.5))
152+
try await Task.sleep(nanoseconds: 500_000_000)
153153

154154
return record
155155
} catch {

0 commit comments

Comments
 (0)