mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +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:
@@ -1995,47 +1995,6 @@ class BugReportServiceMock: BugReportServiceProtocol, @unchecked Sendable {
|
||||
var underlyingCrashedLastRun: Bool!
|
||||
var lastCrashEventID: String?
|
||||
|
||||
//MARK: - applyConfiguration
|
||||
|
||||
var applyConfigurationUnderlyingCallsCount = 0
|
||||
var applyConfigurationCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return applyConfigurationUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = applyConfigurationUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
applyConfigurationUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
applyConfigurationUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var applyConfigurationCalled: Bool {
|
||||
return applyConfigurationCallsCount > 0
|
||||
}
|
||||
var applyConfigurationReceivedConfiguration: RageshakeConfiguration?
|
||||
var applyConfigurationReceivedInvocations: [RageshakeConfiguration] = []
|
||||
var applyConfigurationClosure: ((RageshakeConfiguration) -> Void)?
|
||||
|
||||
func applyConfiguration(_ configuration: RageshakeConfiguration) {
|
||||
applyConfigurationCallsCount += 1
|
||||
applyConfigurationReceivedConfiguration = configuration
|
||||
DispatchQueue.main.async {
|
||||
self.applyConfigurationReceivedInvocations.append(configuration)
|
||||
}
|
||||
applyConfigurationClosure?(configuration)
|
||||
}
|
||||
//MARK: - submitBugReport
|
||||
|
||||
var submitBugReportProgressListenerUnderlyingCallsCount = 0
|
||||
|
||||
Reference in New Issue
Block a user