Skip to content

Commit

Permalink
Cleanup/Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitschlag committed Jul 19, 2024
1 parent 5f7948d commit d610fb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class InstantOnboardingViewController: UIViewController, ProgressAlertHandler {
var progressObserver: NSObjectProtocol?
private var qrCodeReader: QrCodeReaderController?
private var securityScopedResource: NSURL?
private var backupProgressObserver: NSObjectProtocol?
private lazy var canCancel: Bool = {
// "cancel" removes selected unconfigured account, so there needs to be at least one other account
return dcAccounts.getAll().count >= 2
Expand Down Expand Up @@ -70,10 +69,6 @@ class InstantOnboardingViewController: UIViewController, ProgressAlertHandler {
if let progressObserver {
NotificationCenter.default.removeObserver(progressObserver)
}

NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillHideNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: UITextField.textDidChangeNotification, object: contentView?.nameTextField)
}

override func loadView() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ internal final class AdvancedViewController: UITableViewController, ProgressAler

override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
if let backupProgressObserver = self.progressObserver {
NotificationCenter.default.removeObserver(backupProgressObserver)
if let progressObserver {
NotificationCenter.default.removeObserver(progressObserver)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ internal final class ChatsAndMediaViewController: UITableViewController, Progres
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
let nc = NotificationCenter.default
if let backupProgressObserver = self.progressObserver {
nc.removeObserver(backupProgressObserver)
if let progressObserver {
nc.removeObserver(progressObserver)
}
}

Expand Down

0 comments on commit d610fb8

Please sign in to comment.