зеркало из https://github.com/nextcloud/talk-ios.git
Reload table view when old account warning was acknowledged
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
Родитель
6936968435
Коммит
5f22ca64de
|
@ -5,8 +5,14 @@
|
|||
|
||||
import UIKit
|
||||
|
||||
@objc protocol CallsFromOldAccountViewControllerDelegate: AnyObject {
|
||||
func callsFromOldAccountWarningAcknowledged()
|
||||
}
|
||||
|
||||
class CallsFromOldAccountViewController: UIViewController {
|
||||
|
||||
weak var delegate: CallsFromOldAccountViewControllerDelegate?
|
||||
|
||||
@IBOutlet weak var warningTextLabel: UILabel!
|
||||
@IBOutlet weak var acknowledgeWarningButton: NCButton!
|
||||
|
||||
|
@ -45,6 +51,7 @@ class CallsFromOldAccountViewController: UIViewController {
|
|||
@IBAction func acknowledgeWarningButtonPressed(_ sender: Any) {
|
||||
NCSettingsController.sharedInstance().setDidReceiveCallsFromOldAccount(false)
|
||||
self.navigationController?.popViewController(animated: true)
|
||||
self.delegate?.callsFromOldAccountWarningAcknowledged()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ enum AboutSection: Int {
|
|||
case kAboutSectionSourceCode
|
||||
}
|
||||
|
||||
class SettingsTableViewController: UITableViewController, UITextFieldDelegate, UserStatusViewDelegate {
|
||||
class SettingsTableViewController: UITableViewController, UITextFieldDelegate, UserStatusViewDelegate, CallsFromOldAccountViewControllerDelegate {
|
||||
let kPhoneTextFieldTag = 99
|
||||
|
||||
let iconConfiguration = UIImage.SymbolConfiguration(pointSize: 18)
|
||||
|
@ -588,10 +588,15 @@ class SettingsTableViewController: UITableViewController, UITextFieldDelegate, U
|
|||
|
||||
func callsFromOldAccountPressed() {
|
||||
let vc = CallsFromOldAccountViewController()
|
||||
vc.delegate = self
|
||||
|
||||
self.navigationController?.pushViewController(vc, animated: true)
|
||||
}
|
||||
|
||||
func callsFromOldAccountWarningAcknowledged() {
|
||||
self.tableView.reloadData()
|
||||
}
|
||||
|
||||
// MARK: - Table view data source
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
|
|
Загрузка…
Ссылка в новой задаче