Skip to content

Commit 4c17cd8

Browse files
authored
Fix breakage reporting handling (#6807)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1205008441501016/task/1211371004653652?focus=true ### Description * Fix broken check for breakageReportResult and initialPing. We trying to match feature name instead of method ### Steps to test this PR n/a ### UI changes | Before | After | | ------ | ----- | !(Upload before screenshot)|(Upload after screenshot)|
1 parent 64e4165 commit 4c17cd8

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3702,18 +3702,24 @@ class BrowserTabViewModel @Inject constructor(
37023702
"screenUnlock" -> screenUnlock()
37033703
}
37043704
}
3705-
"breakageReportResult" -> if (data != null) {
3706-
breakageReportResult(data)
3705+
"breakageReporting" -> if (data != null) {
3706+
when (method) {
3707+
"breakageReportResult" -> {
3708+
breakageReportResult(data)
3709+
}
3710+
}
37073711
}
3708-
"initialPing" -> {
3709-
// TODO: Eventually, we might want plugins here
3710-
val response = JSONObject(
3711-
mapOf(
3712-
"desktopModeEnabled" to (getSite()?.isDesktopMode ?: false),
3713-
"forcedZoomEnabled" to (accessibilityViewState.value?.forceZoom ?: false),
3714-
),
3715-
)
3716-
onResponse(response)
3712+
"messaging" -> when (method) {
3713+
"initialPing" -> {
3714+
// TODO: Eventually, we might want plugins here
3715+
val response = JSONObject(
3716+
mapOf(
3717+
"desktopModeEnabled" to (getSite()?.isDesktopMode ?: false),
3718+
"forcedZoomEnabled" to (accessibilityViewState.value?.forceZoom ?: false),
3719+
),
3720+
)
3721+
onResponse(response)
3722+
}
37173723
}
37183724
}
37193725
}

0 commit comments

Comments
 (0)