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

WIP refactoring #1385

Draft
wants to merge 2 commits into
base: refactor/deep-link
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"repositoryURL": "https://github.com/amplitude/Amplitude-iOS.git",
"state": {
"branch": null,
"revision": "1928898381581349061808be9b9b143e3c2160ed",
"version": "8.16.2"
"revision": "084a48e2ecd904c00cc5c9345d233f9395e196fa",
"version": "8.16.3"
}
},
{
Expand Down Expand Up @@ -78,8 +78,8 @@
"repositoryURL": "https://github.com/krzyzanowskim/CryptoSwift.git",
"state": {
"branch": null,
"revision": "eee9ad754926c40a0f7e73f152357d37b119b7fa",
"version": "1.7.1"
"revision": "32f641cf24fc7abc1c591a2025e9f2f572648b0f",
"version": "1.7.2"
}
},
{
Expand Down Expand Up @@ -267,8 +267,8 @@
"repositoryURL": "https://github.com/marmelroy/PhoneNumberKit.git",
"state": {
"branch": null,
"revision": "7e22cf3e7d40a6530bbdff255d6350de890512de",
"version": "3.6.1"
"revision": "83e68b5fea032939fd9dcb178cd5bc01fde7ee58",
"version": "3.6.2"
}
},
{
Expand Down
11 changes: 0 additions & 11 deletions p2p_wallet/AppCoordinator/Coordinator.swift
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
//
// Coordinator.swift
// p2p_wallet
//
// Created by Chung Tran on 21/07/2022.
//

import Combine
import Foundation

enum CoordinatorError: Error {
case isAlreadyStarted
}

@MainActor
open class Coordinator<ResultType>: NSObject {
// MARK: - Properties
Expand Down
17 changes: 6 additions & 11 deletions p2p_wallet/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
//
// AppDelegate.swift
// p2p wallet
//
// Created by Chung Tran on 10/22/20.
//

@_exported import BEPureLayout
import Combine
import Firebase
import Intercom
import KeyAppUI
Expand All @@ -18,7 +12,8 @@ import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
private var appCoordinator: AppCoordinator?
private var appCoordinator: AppCoordinator!
private var subscriptions = [AnyCancellable]()

@Injected private var notificationService: NotificationService

Expand Down Expand Up @@ -70,9 +65,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
Lokalise.shared.swizzleMainBundle()

// Set app coordinator
appCoordinator = AppCoordinator()
appCoordinator!.start()
window = appCoordinator?.window
window = UIWindow(frame: UIScreen.main.bounds)
appCoordinator = AppCoordinator(window: window!)
appCoordinator.start().sink { _ in }.store(in: &subscriptions)

// notify notification Service
notificationService.wasAppLaunchedFromPush(launchOptions: launchOptions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import SolanaSwift

extension AppCoordinator: AppEventHandlerDelegate {
func didStartLoading() {
window?.showLoadingIndicatorView()
window.showLoadingIndicatorView()
}

func didStopLoading() {
window?.hideLoadingIndicatorView()
window.hideLoadingIndicatorView()
}

func userDidChangeAPIEndpoint(to _: APIEndPoint) {
Expand All @@ -43,7 +43,7 @@ extension AppCoordinator: AppEventHandlerDelegate {
}

func userDidChangeTheme(to style: UIUserInterfaceStyle) {
window?.overrideUserInterfaceStyle = style
window.overrideUserInterfaceStyle = style
}

func disablePincodeOnFirstAppear() {
Expand Down
Loading