using injected matrix instance for the bug reporting to avoid directly calling getInstance
This commit is contained in:
parent
a63e79bad5
commit
8dc8c209d3
|
@ -73,7 +73,8 @@ class BugReporter @Inject constructor(
|
|||
private val versionProvider: VersionProvider,
|
||||
private val vectorPreferences: VectorPreferences,
|
||||
private val vectorFileLogger: VectorFileLogger,
|
||||
private val systemLocaleProvider: SystemLocaleProvider
|
||||
private val systemLocaleProvider: SystemLocaleProvider,
|
||||
private val matrix: Matrix
|
||||
) {
|
||||
var inMultiWindowMode = false
|
||||
|
||||
|
@ -265,7 +266,7 @@ class BugReporter @Inject constructor(
|
|||
val builder = BugReporterMultipartBody.Builder()
|
||||
.addFormDataPart("text", text)
|
||||
.addFormDataPart("app", rageShakeAppNameForReport(reportType))
|
||||
.addFormDataPart("user_agent", Matrix.getInstance(context).getUserAgent())
|
||||
.addFormDataPart("user_agent", matrix.getUserAgent())
|
||||
.addFormDataPart("user_id", userId)
|
||||
.addFormDataPart("can_contact", canContact.toString())
|
||||
.addFormDataPart("device_id", deviceId)
|
||||
|
|
Loading…
Reference in New Issue