-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network detail screen #29
Conversation
public struct CircleProgressView: UIViewRepresentable { | ||
|
||
public struct DrawingProgressView: UIViewRepresentable { | ||
var shape: DrawingProgressUIView.ShapePath | ||
var color: Color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reasons to use var?
case let .response(value): | ||
let stringResponse = try? value.get(String.self) | ||
|
||
DispatchQueue.main.async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you receiving on main queue as I see. Why DispatchQueue async needed here?
try? await self.addEthChain(from: from, to: chain) | ||
} | ||
} else { | ||
DispatchQueue.main.async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question
|
||
self.triedAddingChain = false | ||
self.switchFailed = false | ||
Task { @MainActor in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that switchChain will be executed on main thread. You should mark switchChain method with @mainactor ig
|
||
DispatchQueue.main.async { | ||
self.store.selectedChain = ChainPresets.ethChains.first(where: { $0.chainReference == String(chainReference) }) | ||
self.router.setRoute(Router.AccountSubpage.profile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strong reference
|
||
DispatchQueue.main.async { | ||
self.store.selectedChain = chain | ||
self.router.setRoute(Router.AccountSubpage.profile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strong reference
var body: some View { | ||
VStack { | ||
content() | ||
.onAppear { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be .task{ } will be enough here? It also has async context so no need to create extra Tasks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but .task is executing on first view load only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but it is also iOS 15+
8cc2cbe
to
924f1ff
Compare
Contains rerecorded snapshots for Xcode 15/ iOS 17