Skip to content
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

Merged
merged 7 commits into from
Nov 14, 2023
Merged

Network detail screen #29

merged 7 commits into from
Nov 14, 2023

Conversation

radeknovis
Copy link
Contributor

@radeknovis radeknovis commented Nov 6, 2023

Contains rerecorded snapshots for Xcode 15/ iOS 17

public struct CircleProgressView: UIViewRepresentable {

public struct DrawingProgressView: UIViewRepresentable {
var shape: DrawingProgressUIView.ShapePath
var color: Color

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 {

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 {

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

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)

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)

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 {

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

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

Copy link
Contributor Author

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+

@radeknovis radeknovis merged commit 5ba59f8 into develop Nov 14, 2023
3 checks passed
@radeknovis radeknovis deleted the feat/network-detail branch November 14, 2023 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants