Skip to content

Commit

Permalink
Add a default-implementation for progress-alert-handler
Browse files Browse the repository at this point in the history
Feel free to override this for container view controller
  • Loading branch information
zeitschlag committed Aug 1, 2024
1 parent 1479672 commit 4cc08f3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,4 @@ extension AccountSetupController: UITextFieldDelegate {
}
}

extension AccountSetupController: ProgressAlertHandlerDataSource {
func viewController() -> UIViewController {
self
}
}
extension AccountSetupController: ProgressAlertHandlerDataSource {}

Check failure on line 653 in deltachat-ios/Controller/AccountSetup/AccountSetupController.swift

View workflow job for this annotation

GitHub Actions / build

redundant conformance of 'AccountSetupController' to protocol 'ProgressAlertHandlerDataSource'
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,4 @@ extension InstantOnboardingViewController: QrCodeReaderDelegate {
}
}

extension InstantOnboardingViewController: ProgressAlertHandlerDataSource {
func viewController() -> UIViewController {
self
}
}
extension InstantOnboardingViewController: ProgressAlertHandlerDataSource {}

Check failure on line 297 in deltachat-ios/Controller/AccountSetup/Instand Onboarding/InstantOnboardingViewController.swift

View workflow job for this annotation

GitHub Actions / build

redundant conformance of 'InstantOnboardingViewController' to protocol 'ProgressAlertHandlerDataSource'

Check failure on line 297 in deltachat-ios/Controller/AccountSetup/Instand Onboarding/InstantOnboardingViewController.swift

View workflow job for this annotation

GitHub Actions / build

redundant conformance of 'InstantOnboardingViewController' to protocol 'ProgressAlertHandlerDataSource'
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,4 @@ extension WelcomeViewController: MediaPickerDelegate {
}
}

extension WelcomeViewController: ProgressAlertHandlerDataSource {
func viewController() -> UIViewController {
self
}
}
extension WelcomeViewController: ProgressAlertHandlerDataSource {}

Check failure on line 491 in deltachat-ios/Controller/AccountSetup/WelcomeViewController.swift

View workflow job for this annotation

GitHub Actions / build

redundant conformance of 'WelcomeViewController' to protocol 'ProgressAlertHandlerDataSource'
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,4 @@ internal final class AdvancedViewController: UITableViewController {
}
}

extension AdvancedViewController: ProgressAlertHandlerDataSource {
func viewController() -> UIViewController {
self
}
}
extension AdvancedViewController: ProgressAlertHandlerDataSource {}

Check failure on line 444 in deltachat-ios/Controller/Settings/AdvancedViewController.swift

View workflow job for this annotation

GitHub Actions / build

redundant conformance of 'AdvancedViewController' to protocol 'ProgressAlertHandlerDataSource'
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,4 @@ internal final class ChatsAndMediaViewController: UITableViewController {
}
}

extension ChatsAndMediaViewController: ProgressAlertHandlerDataSource {
func viewController() -> UIViewController {
self
}
}
extension ChatsAndMediaViewController: ProgressAlertHandlerDataSource {}

Check failure on line 247 in deltachat-ios/Controller/Settings/ChatsAndMediaViewController.swift

View workflow job for this annotation

GitHub Actions / build

redundant conformance of 'ChatsAndMediaViewController' to protocol 'ProgressAlertHandlerDataSource'
6 changes: 6 additions & 0 deletions deltachat-ios/Handler/ProgressAlertHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ protocol ProgressAlertHandlerDataSource: AnyObject {
func viewController() -> UIViewController
}

extension UIViewController: ProgressAlertHandlerDataSource {
func viewController() -> UIViewController {
self
}
}

class ProgressAlertHandler {

let dcAccounts: DcAccounts
Expand Down

0 comments on commit 4cc08f3

Please sign in to comment.