Skip to content

Commit

Permalink
Remove usage of unused parameter (#2400)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitschlag committed Nov 18, 2024
1 parent 24775ed commit 5662fd9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ extension InstantOnboardingViewController: MediaPickerDelegate {

// MARK: - QrCodeReaderDelegate
extension InstantOnboardingViewController: QrCodeReaderDelegate {
func handleQrCode(_ viewController: UIViewController, qrCode: String) {
func handleQrCode(_ qrCode: String) {
// update with new code
let parsedQrCode = dcContext.checkQR(qrCode: qrCode)
if parsedQrCode.state == DC_QR_LOGIN || parsedQrCode.state == DC_QR_ACCOUNT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class WelcomeViewController: UIViewController {
navigationItem.leftBarButtonItem = cancelButton
}
if let accountCode {
handleQrCode(self, qrCode: accountCode)
handleQrCode(accountCode)
}
}

Expand Down Expand Up @@ -227,7 +227,7 @@ class WelcomeViewController: UIViewController {

// MARK: - QrCodeReaderDelegate
extension WelcomeViewController: QrCodeReaderDelegate {
func handleQrCode(_ viewController: UIViewController, qrCode: String) {
func handleQrCode(_ qrCode: String) {
let lot = dcContext.checkQR(qrCode: qrCode)
if lot.state == DC_QR_BACKUP || lot.state == DC_QR_BACKUP2 {
confirmSetupNewDevice(qrCode: qrCode)
Expand Down
2 changes: 1 addition & 1 deletion deltachat-ios/Controller/QrCodeReaderController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ extension QrCodeReaderController: AVCaptureMetadataOutputObjectsDelegate {
if supportedCodeTypes.contains(metadataObj.type) {
if metadataObj.stringValue != nil {
self.captureSession.stopRunning()
self.delegate?.handleQrCode(self, qrCode: metadataObj.stringValue!)
self.delegate?.handleQrCode(metadataObj.stringValue!)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions deltachat-ios/Controller/QrPageController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class QrPageController: UIPageViewController {
}

@objc func pasteFromClipboard(_ action: UIAlertAction) {
handleQrCode(self, qrCode: UIPasteboard.general.string ?? "")
handleQrCode(UIPasteboard.general.string ?? "")
}

// MARK: - update
Expand Down Expand Up @@ -208,7 +208,7 @@ extension QrPageController: UIPageViewControllerDataSource, UIPageViewController

// MARK: - QRCodeDelegate
extension QrPageController: QrCodeReaderDelegate {
func handleQrCode(_ viewController: UIViewController, qrCode: String) {
func handleQrCode(_ qrCode: String) {
guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return }
appDelegate.appCoordinator.coordinate(qrCode: qrCode, from: self)
}
Expand Down
2 changes: 1 addition & 1 deletion deltachat-ios/Helper/Protocols.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit

protocol QrCodeReaderDelegate: AnyObject {
func handleQrCode(_ viewController: UIViewController, qrCode: String)
func handleQrCode(_ qrCode: String)
}

protocol ContactListDelegate: AnyObject {
Expand Down

0 comments on commit 5662fd9

Please sign in to comment.