update text chip color scheme

This commit is contained in:
Satindar Dhillon
2022-07-21 10:39:27 -07:00
parent 0075caa894
commit 03fac22c29
5 changed files with 86 additions and 17 deletions

View File

@ -19,7 +19,7 @@ import WebKit
webView.isOpaque = false
webView.backgroundColor = UIColor.clear
if let url = request.url {
let themeID = UITraitCollection.current.userInterfaceStyle == .dark ? "Gray" : "LightGray"
let themeID = Color.isDarkMode ? "Gray" : "LightGray"
webView.injectCookie(cookieString: "theme=\(themeID); Max-Age=31536000;", url: url)
}
return webView