mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Refactor Rageshake URL and Target configuration. (#4337)
* Move the rageshakeURL configuration from the BugReportService to AppSettings. * Refactor Target to return a handle when configuring. This helps with reconfiguration and removes the @MainActor constraint.
This commit is contained in:
@@ -9,15 +9,18 @@ import IntentsUI
|
||||
import SwiftUI
|
||||
|
||||
class ShareExtensionViewController: UIViewController {
|
||||
private static var targetConfiguration: Target.Configuration?
|
||||
private let appSettings: CommonSettingsProtocol = AppSettings()
|
||||
private let hostingController = UIHostingController(rootView: ShareExtensionView())
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
Target.shareExtension.configure(logLevel: appSettings.logLevel,
|
||||
traceLogPacks: appSettings.traceLogPacks,
|
||||
sentryURL: nil)
|
||||
if Self.targetConfiguration == nil {
|
||||
Self.targetConfiguration = Target.shareExtension.configure(logLevel: appSettings.logLevel,
|
||||
traceLogPacks: appSettings.traceLogPacks,
|
||||
sentryURL: nil)
|
||||
}
|
||||
|
||||
addChild(hostingController)
|
||||
view.addMatchedSubview(hostingController.view)
|
||||
|
||||
@@ -79,7 +79,7 @@ targets:
|
||||
- path: ../Sources
|
||||
- path: ../SupportingFiles
|
||||
- path: ../../ElementX/Sources/ShareExtension
|
||||
- path: ../../ElementX/Sources/Application/AppSettings.swift
|
||||
- path: ../../ElementX/Sources/Application/Settings
|
||||
- path: ../../ElementX/Sources/Application/TargetConfiguration.swift
|
||||
- path: ../../ElementX/Sources/Other/Extensions/Bundle.swift
|
||||
- path: ../../ElementX/Sources/Other/Extensions/FileManager.swift
|
||||
@@ -88,6 +88,6 @@ targets:
|
||||
- path: ../../ElementX/Sources/Other/Extensions/UIView.swift
|
||||
- path: ../../ElementX/Sources/Other/Extensions/URL.swift
|
||||
- path: ../../ElementX/Sources/Other/InfoPlistReader.swift
|
||||
- path: ../../ElementX/Sources/Other/CurrentValuePublisher.swift
|
||||
- path: ../../ElementX/Sources/Other/Logging
|
||||
- path: ../../ElementX/Sources/Other/UserPreference.swift
|
||||
- path: ../../ElementX/Sources/UITests/UITestsScreenIdentifier.swift
|
||||
|
||||
Reference in New Issue
Block a user