More improvements and fixes (see commit description)

- put SwiftUI in an unstable feature
- Add Reset adi.pb to SwiftUI settings
- Add localizations to more things such as Error Log and Refresh Attempts
- Move debug logging into Advanced Settings
- Add padding to version text at the bottom of SwiftUI settings
- Add some things to Unstable Features such as nesting the Feature enum in UnstableFeatures and allowing on enable/disable hooks
- Don't use ObservableObject for UnstableFeatures as it's not needed
- fix a bug with unstable features where the toggle would be reverted if you go into another tab and then back
- Use SwiftUI advanced settings in UIKit
This commit is contained in:
naturecodevoid
2023-05-27 21:53:04 -07:00
parent d2c15b5acd
commit 026392dbc7
13 changed files with 341 additions and 199 deletions

View File

@@ -7,6 +7,7 @@
//
import UIKit
import SwiftUI
import SafariServices
import MessageUI
import Intents
@@ -551,13 +552,9 @@ extension SettingsViewController
self.present(alertController, animated: true)
self.tableView.deselectRow(at: indexPath, animated: true)
case .advancedSettings:
// Create the URL that deep links to your app's custom settings.
if let url = URL(string: UIApplication.openSettingsURLString) {
// Ask the system to open that URL.
UIApplication.shared.open(url)
} else {
ELOG("UIApplication.openSettingsURLString invalid")
}
let controller = UIHostingController(rootView: AdvancedSettingsView())
navigationController?.pushViewController(controller, animated: true)
self.tableView.deselectRow(at: indexPath, animated: true)
case .refreshAttempts, .errorLog: break
}