Skip to content

Commit

Permalink
Find a better name (#2134)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitschlag committed Oct 9, 2024
1 parent cda393f commit 05f23b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deltachat-ios/Controller/QrPageController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,6 @@ extension QrPageController: QrCodeReaderDelegate {

func handleQrCode(_ code: String) {
guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return }
appDelegate.appCoordinator.reallyHandleQRCode(code, from: self)
appDelegate.appCoordinator.coordinate(qrCode: code, from: self)
}
}
8 changes: 4 additions & 4 deletions deltachat-ios/Coordinator/AppCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class AppCoordinator: NSObject {
}

func handleDeltaChatInvitation(url: URL, from viewController: UIViewController) {
reallyHandleQRCode(url.absoluteString, from: viewController)
coordinate(qrCode: url.absoluteString, from: viewController)
}

func handleQRCode(_ code: String) {
Expand All @@ -215,13 +215,13 @@ class AppCoordinator: NSObject {
if let navController = self.tabBarController.selectedViewController as? UINavigationController,
let topViewController = navController.topViewController,
let qrPageController = topViewController as? QrPageController {
reallyHandleQRCode(code, from: qrPageController)
coordinate(qrCode: code, from: qrPageController)
}
}
}

/// Works for both i.delta.chat and QR-codes
func reallyHandleQRCode(_ code: String, from viewController: UIViewController) {
func coordinate(qrCode code: String, from viewController: UIViewController) {
let dcContext = dcAccounts.getSelected()

showChats()
Expand Down

0 comments on commit 05f23b4

Please sign in to comment.