|
@@ -28,16 +28,6 @@ class NCManageAutoUploadFileName: XLFormViewController {
|
|
|
let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
|
|
let dateExample = Date()
|
|
|
|
|
|
- required init(coder aDecoder: NSCoder) {
|
|
|
- super.init(coder: aDecoder)
|
|
|
- self.initializeForm()
|
|
|
- }
|
|
|
-
|
|
|
- override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
|
|
|
- super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
|
|
- self.initializeForm()
|
|
|
- }
|
|
|
-
|
|
|
func initializeForm() {
|
|
|
|
|
|
let form : XLFormDescriptor = XLFormDescriptor(title: NSLocalizedString("_autoupload_filename_title_", comment: "")) as XLFormDescriptor
|
|
@@ -109,6 +99,7 @@ class NCManageAutoUploadFileName: XLFormViewController {
|
|
|
|
|
|
section.addFormRow(row)
|
|
|
|
|
|
+ self.tableView.separatorStyle = UITableViewCell.SeparatorStyle.none
|
|
|
self.form = form
|
|
|
}
|
|
|
|
|
@@ -157,18 +148,11 @@ class NCManageAutoUploadFileName: XLFormViewController {
|
|
|
|
|
|
|
|
|
override func viewDidLoad() {
|
|
|
-
|
|
|
super.viewDidLoad()
|
|
|
|
|
|
- self.navigationController?.navigationBar.isTranslucent = false
|
|
|
- self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
|
|
|
- self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
|
|
|
- self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.sharedInstance.brandText]
|
|
|
-
|
|
|
- self.tableView.separatorStyle = UITableViewCell.SeparatorStyle.none
|
|
|
- self.tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundForm
|
|
|
-
|
|
|
- self.reloadForm()
|
|
|
+
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(self.changeTheming), name: NSNotification.Name(rawValue: "changeTheming"), object: nil)
|
|
|
+ changeTheming()
|
|
|
}
|
|
|
|
|
|
func reloadForm() {
|
|
@@ -183,6 +167,12 @@ class NCManageAutoUploadFileName: XLFormViewController {
|
|
|
self.form.delegate = self
|
|
|
}
|
|
|
|
|
|
+ @objc func changeTheming() {
|
|
|
+ appDelegate.changeTheming(self, tableView: tableView, collectionView: nil)
|
|
|
+ initializeForm()
|
|
|
+ self.reloadForm()
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
func previewFileName(valueRename : String?) -> String {
|