Skip to content

Commit

Permalink
Support dark mode in Zendesk chat (#21486)
Browse files Browse the repository at this point in the history
* Updated to latest Zendesk

* Use setAlgorithmicDarkeningAllowed

* Reverted Zendesk library update
  • Loading branch information
nbradbury authored Nov 27, 2024
1 parent 817841f commit 8123ff6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Context
import android.content.Intent
import android.content.pm.ApplicationInfo
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.util.Log
import android.view.Menu
Expand Down Expand Up @@ -145,6 +146,11 @@ class SupportWebViewActivity : WPWebViewActivity(), SupportWebViewClient.Support
.addPathHandler("/assets/", AssetsPathHandler(this))
.addPathHandler("/res/", ResourcesPathHandler(this))
.build()

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
mWebView.settings.setAlgorithmicDarkeningAllowed(true)
}

mWebView.webViewClient = SupportWebViewClient(this, assetLoader)

// Setup debugging; See https://developers.google.com/web/tools/chrome-devtools/remote-debugging/webviews
Expand Down

0 comments on commit 8123ff6

Please sign in to comment.