android-browser-helper icon indicating copy to clipboard operation
android-browser-helper copied to clipboard

Adapt caching behaviour for dark/light theme switching

Open khmyznikov opened this issue 2 years ago • 8 comments

Trying to address this bug

khmyznikov avatar Mar 10 '24 18:03 khmyznikov

@uwolfer is it looks like a fix?

khmyznikov avatar Mar 10 '24 18:03 khmyznikov

@PEConn @andreban how to check build?

khmyznikov avatar Mar 10 '24 18:03 khmyznikov

@andreban from my understanding, it solves the issue of wrong caching of different icons for light/dark splash screen. https://github.com/GoogleChrome/android-browser-helper/pull/51#issuecomment-1978621933

khmyznikov avatar Mar 11 '24 10:03 khmyznikov

Thanks for the update! What I'm making sure I understand is how this PR solves the issue - my understanding is that the bug is caused by only re-transferring the splash image file when the application is updated. But it also needs to be transferred when the theme changes. To solve that, you're adding the theme to the default preferences object, retrieving the value on launch, and ensuring the existing file is only re-used if all the following are true: the file exists, the app hasn't been updated, and the theme wasn't change. Does this sound right?

andreban avatar Mar 11 '24 10:03 andreban

@andreban yeah that's sounds right 👍

khmyznikov avatar Mar 11 '24 13:03 khmyznikov

@uwolfer is it looks like a fix?

Thanks for working on this, @khmyznikov. Code makes sense to me, but I have not tested it. I would suggest that you update the PR title to reflect what we actually have fixed with this change.

uwolfer avatar Mar 12 '24 09:03 uwolfer