MicroG-RE icon indicating copy to clipboard operation
MicroG-RE copied to clipboard

(WebView) Sometimes login page doesn't follow system theme

Open 0xrxL opened this issue 1 year ago • 4 comments

As I already described in the title, sometimes (probably when MicroG login service it's invoked in a new instance) login page appears white instead dark (as my system theme).

This bug is 100% reproducible (one time) during login on a new MicroG installation.

0xrxL avatar Aug 14 '24 02:08 0xrxL

Are you referring to the webview login?

Yes, this bug has already been noticed, currently checks the app theme status instead of the system, was defined this way to prevent a reload that causes a pile of errors and then the webview closes.

You can reproduce this bug changing system theme with webview page open

Then check through the themedContext.getResources instead of uiModeManager.systemIsDark and based on that force dark mode in webview.

Despite the logs I couldn't find a good solution to solve this sudden closure, but following the application theme made it happen less frequently.

It's been a while since I did this so I might as well look at it again, I kept the implementation to avoid some flashbangs XD

WSTxda avatar Aug 14 '24 03:08 WSTxda

Are you referring to the webview login?

Exactly.

0xrxL avatar Aug 14 '24 03:08 0xrxL

An alternative could be a fully Material page to login, which interact with webview to fetch the web links to complete the login. 🤷‍♂️

0xrxL avatar Aug 14 '24 03:08 0xrxL

I was just thinking about fixing the theme transition, which is likely what's causing this to happen.

WSTxda avatar Aug 14 '24 03:08 WSTxda

Apparently it was fixed, check f4cbcd5 tested on avd sdk 29 and my personal device HyperOS sdk 34

WSTxda avatar Aug 26 '24 01:08 WSTxda

Apparently it was fixed, check f4cbcd5 tested on avd sdk 29 and my personal device HyperOS sdk 34

Sorry for the late answer, but I didn't tried it, because I uninstalled it a month ago, due to a high battery drain compared to the ReVanced MicroG.

Maybe you can try to check what's wrong, by using my personal YouTube client (you'll found the patcher in my repository). 🤷‍♂️

0xrxL avatar Sep 13 '24 04:09 0xrxL

I tried it on my emulator (I had free time to do), but unfortunately the bug is not fixed.

It happens once after a new installation. 🤷‍♂️

0xrxL avatar Oct 12 '24 01:10 0xrxL