diff --git a/Sources/App/AppDelegate.swift b/Sources/App/AppDelegate.swift index 72a7f682477967599a823601b8315c46ed429ee6..f2ba599d5878e80d217675e81a049946c18bda1e 100644 --- a/Sources/App/AppDelegate.swift +++ b/Sources/App/AppDelegate.swift @@ -24,6 +24,7 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { @KeyObject(.recordingLogs, defaultValue: true) var recordingLogs: Bool @KeyObject(.crashReporting, defaultValue: true) var isCrashReportingEnabled: Bool + var invitation: String? var calledStopNetwork = false var forceFailedPendingMessages = false @@ -133,6 +134,12 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { } public func applicationDidBecomeActive(_ application: UIApplication) { + // TODO: + /// If an invitation is set -> navigate to + /// search screen and perform a search + /// + invitation = nil + application.applicationIconBadgeNumber = 0 coverView?.removeFromSuperview() } @@ -142,7 +149,12 @@ public class AppDelegate: UIResponder, UIApplicationDelegate { open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:] ) -> Bool { - dropboxService.handleOpenUrl(url) + if let host = url.host, host.starts(with: "invitation-") { + invitation = host.replacingOccurrences(of: "invitation-", with: "") + return true + } + + return dropboxService.handleOpenUrl(url) } } diff --git a/Sources/LaunchFeature/LaunchController.swift b/Sources/LaunchFeature/LaunchController.swift index 2eb373f55784bed3e9a11293acc7cca9aee2fc08..8db4bd6344c73a883176942b46e9ae22724bd609 100644 --- a/Sources/LaunchFeature/LaunchController.swift +++ b/Sources/LaunchFeature/LaunchController.swift @@ -5,7 +5,6 @@ import Combine import PushFeature import DependencyInjection - public final class LaunchController: UIViewController { @Dependency private var hud: HUD @Dependency private var coordinator: LaunchCoordinating diff --git a/Sources/SearchFeature/Controllers/SearchLeftController.swift b/Sources/SearchFeature/Controllers/SearchLeftController.swift index bbfabd2836990bb00c86e01a09527bdbac8b1145..6be71bfe90dbddbf0426e7eac07b0033d189276f 100644 --- a/Sources/SearchFeature/Controllers/SearchLeftController.swift +++ b/Sources/SearchFeature/Controllers/SearchLeftController.swift @@ -403,7 +403,6 @@ final class SearchLeftController: UIViewController { coordinator.toDrawer(drawer, from: self) } - } extension SearchLeftController: UITableViewDelegate {