Skip to content

Commit 7799c5a

Browse files
fix: white themes not working
1 parent 31ddebf commit 7799c5a

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/plugins/system/android/com/foxdebug/system/System.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,7 @@ private void setUiTheme(
16941694
this.systemBarColor = Color.parseColor(systemBarColor);
16951695
this.theme = new Theme(scheme);
16961696

1697-
preferences.set("BackgroundColor", String.format("0x%08X", this.systemBarColor));
1697+
preferences.set("BackgroundColor", this.systemBarColor);
16981698

16991699
webView.getPluginManager().postMessage("updateSystemBars", null);
17001700

src/plugins/system/www/plugin.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ module.exports = {
164164
return myInAppBrowser;
165165
},
166166
setUiTheme: function (systemBarColor, theme, onSuccess, onFail) {
167+
const color = systemBarColor.toLowerCase();
168+
169+
if (color === '#ffffff' || color === '#ffffffff') {
170+
systemBarColor = '#fffffe';
171+
}
172+
173+
167174
cordova.exec((out)=>{
168175
window.statusbar.setBackgroundColor(systemBarColor);
169176
onSuccess(out);

0 commit comments

Comments
 (0)