Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5a6c244

Browse files
Update README.md
1 parent e1d6829 commit 5a6c244

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,17 @@ To ensure .play is applied before .pause, you can use `Task` to schedule the sec
163163
Task { @MainActor in
164164
playbackCommand = .pause
165165
}
166-
```
166+
```
167167
**.play → .pause → .play**
168168

169-
```swift
169+
```swift
170170
playbackCommand = .play
171171

172172
Task {
173173
playbackCommand = .pause
174174
Task { playbackCommand = .play } // This runs AFTER `.pause`
175175
}
176-
```
176+
```
177177
If playbackCommand is critical for playback logic, use an ObservableObject with @Published instead of @State. This avoids SwiftUI’s state batching
178178
```swift
179179
@Published var playbackCommand: PlaybackCommand = .pause

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /