From 7cf7dd215980a5284145e59f6e811919672c0a4e Mon Sep 17 00:00:00 2001 From: Matias Bzurovski Date: Wed, 19 Jun 2024 14:45:29 +0200 Subject: [PATCH] Lint --- .../AppsFlyerClient+Live.swift | 4 +- .../Features/AppFeature/AppDelegate.swift | 1 - .../Features/AppFeature/SceneDelegate.swift | 7 -- .../HomeFeature/Coordinator/Home+View.swift | 1 - .../Startup/OnboardingStartup+View.swift | 67 +++++++++---------- .../DebugSettingsCoordinator+View.swift | 14 ---- 6 files changed, 34 insertions(+), 60 deletions(-) diff --git a/RadixWallet/Clients/AppsFlyerClient/AppsFlyerClient+Live.swift b/RadixWallet/Clients/AppsFlyerClient/AppsFlyerClient+Live.swift index 9566e3db50..0b90d60d73 100644 --- a/RadixWallet/Clients/AppsFlyerClient/AppsFlyerClient+Live.swift +++ b/RadixWallet/Clients/AppsFlyerClient/AppsFlyerClient+Live.swift @@ -39,9 +39,9 @@ extension AppsFlyerClient: DependencyKey { private class Delegate: NSObject, DeepLinkDelegate, @unchecked Sendable { func didResolveDeepLink(_ result: DeepLinkResult) { if let deepLink = result.deepLink { - print("M- did resolve deep link. Is deferred: \(deepLink.isDeferred). Click events: \(deepLink.clickEvent)") + loggerGlobal.info("did resolve deep link. Is deferred: \(deepLink.isDeferred). Click events: \(deepLink.clickEvent)") } else if let error = result.error { - print("M- failed to resolve deep link. Status: \(result.status), Error: \(error)") + loggerGlobal.info("failed to resolve deep link. Status: \(result.status), Error: \(error.localizedDescription)") } } } diff --git a/RadixWallet/Features/AppFeature/AppDelegate.swift b/RadixWallet/Features/AppFeature/AppDelegate.swift index 1e18cbed34..4d49989af0 100644 --- a/RadixWallet/Features/AppFeature/AppDelegate.swift +++ b/RadixWallet/Features/AppFeature/AppDelegate.swift @@ -1,4 +1,3 @@ -import AppsFlyerLib import ComposableArchitecture import SwiftUI diff --git a/RadixWallet/Features/AppFeature/SceneDelegate.swift b/RadixWallet/Features/AppFeature/SceneDelegate.swift index bdf527b466..ae1e62ce12 100644 --- a/RadixWallet/Features/AppFeature/SceneDelegate.swift +++ b/RadixWallet/Features/AppFeature/SceneDelegate.swift @@ -1,4 +1,3 @@ -import AppsFlyerLib import ComposableArchitecture import SwiftUI @@ -13,12 +12,6 @@ public final class SceneDelegate: NSObject, UIWindowSceneDelegate, ObservableObj ) { windowScene = scene as? UIWindowScene - if let userActivity = connectionOptions.userActivities.first { - AppsFlyerLib.shared().continue(userActivity, restorationHandler: nil) - } else if let url = connectionOptions.urlContexts.first?.url { - AppsFlyerLib.shared().handleOpen(url, options: nil) - } - if let windowScene, // avoids unimplemented("OverlayWindowClient.isUserInteractionEnabled") diff --git a/RadixWallet/Features/HomeFeature/Coordinator/Home+View.swift b/RadixWallet/Features/HomeFeature/Coordinator/Home+View.swift index 97e0ef9b12..9dff733956 100644 --- a/RadixWallet/Features/HomeFeature/Coordinator/Home+View.swift +++ b/RadixWallet/Features/HomeFeature/Coordinator/Home+View.swift @@ -50,7 +50,6 @@ extension Home { } VStack(spacing: .medium3) { - Text(DebugInfo.shared.content) ForEachStore( store.scope( state: \.accountRows, diff --git a/RadixWallet/Features/OnboardingFeature/Children/Startup/OnboardingStartup+View.swift b/RadixWallet/Features/OnboardingFeature/Children/Startup/OnboardingStartup+View.swift index 5888eb6d3f..ead5939bf4 100644 --- a/RadixWallet/Features/OnboardingFeature/Children/Startup/OnboardingStartup+View.swift +++ b/RadixWallet/Features/OnboardingFeature/Children/Startup/OnboardingStartup+View.swift @@ -17,42 +17,39 @@ extension OnboardingStartup { extension OnboardingStartup.View { public var body: some View { NavigationStack { - WithViewStore(store, observe: { $0 }, send: { .view($0) }) { _ in - ScrollView { - Text(DebugInfo.shared.content) + WithViewStore(store, observe: { $0 }, send: { .view($0) }) { viewStore in + VStack(spacing: 0) { + Text(L10n.Onboarding.Step1.title) + .foregroundColor(.app.gray1) + .textStyle(.sheetTitle) + .padding(.top, .large1) + .padding(.horizontal, .large1) + .padding(.bottom, .medium3) + + Text(L10n.Onboarding.Step1.subtitle) + .foregroundColor(.app.gray2) + .textStyle(.secondaryHeader) + .padding(.horizontal, .huge3) + + Spacer(minLength: 0) + + SplashGraphic() + + Spacer(minLength: 0) + } + .multilineTextAlignment(.center) + .footer { + Button(L10n.Onboarding.newUser) { + viewStore.send(.selectedNewWalletUser) + } + .buttonStyle(.primaryRectangular) + .padding(.bottom, .small2) + + Button(L10n.Onboarding.restoreFromBackup) { + viewStore.send(.selectedRestoreFromBackup) + } + .buttonStyle(.primaryText()) } -// VStack(spacing: 0) { -// Text(L10n.Onboarding.Step1.title) -// .foregroundColor(.app.gray1) -// .textStyle(.sheetTitle) -// .padding(.top, .large1) -// .padding(.horizontal, .large1) -// .padding(.bottom, .medium3) -// -// Text(L10n.Onboarding.Step1.subtitle) -// .foregroundColor(.app.gray2) -// .textStyle(.secondaryHeader) -// .padding(.horizontal, .huge3) -// -// Spacer(minLength: 0) -// -// SplashGraphic() -// -// Spacer(minLength: 0) -// } -// .multilineTextAlignment(.center) -// .footer { -// Button(L10n.Onboarding.newUser) { -// viewStore.send(.selectedNewWalletUser) -// } -// .buttonStyle(.primaryRectangular) -// .padding(.bottom, .small2) -// -// Button(L10n.Onboarding.restoreFromBackup) { -// viewStore.send(.selectedRestoreFromBackup) -// } -// .buttonStyle(.primaryText()) -// } } .destinations(with: store) } diff --git a/RadixWallet/Features/SettingsFeature/DebugSettings/Coordinator/DebugSettingsCoordinator+View.swift b/RadixWallet/Features/SettingsFeature/DebugSettings/Coordinator/DebugSettingsCoordinator+View.swift index e236d9c442..f12b2d6970 100644 --- a/RadixWallet/Features/SettingsFeature/DebugSettings/Coordinator/DebugSettingsCoordinator+View.swift +++ b/RadixWallet/Features/SettingsFeature/DebugSettings/Coordinator/DebugSettingsCoordinator+View.swift @@ -1,19 +1,6 @@ import ComposableArchitecture import SwiftUI -// MARK: - DebugInfo -class DebugInfo { - static let shared = DebugInfo() - - private(set) var content = "" - private init() {} - - func add(_ msg: String) { - content.append("\nšŸ†• \(msg)") - loggerGlobal.info("šŸ†• \(msg)") - } -} - // MARK: - DebugSettingsCoordinator.View extension DebugSettingsCoordinator { public struct ViewState: Equatable {} @@ -32,7 +19,6 @@ extension DebugSettingsCoordinator.View { public var body: some View { ScrollView { VStack(spacing: .zero) { - Text(DebugInfo.shared.content) ForEachStatic(rows) { kind in SettingsRow(kind: kind, store: store) }