Hello!
I'm using PasteButton
to set the value of a Binding<String>
, and even though I'm using @MainActor
, I'm getting a purple warning.
When I set a breakpoint, I can see that my function is not called on the main thread.
PasteButton doesn't run its onPaste action on the main thread.
I fixed it by making the paste
function async
, and calling it in a Task {}
.