Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue when toggling options in the menu #34

Open
toby-bro opened this issue Sep 11, 2024 · 1 comment
Open

Performance issue when toggling options in the menu #34

toby-bro opened this issue Sep 11, 2024 · 1 comment
Labels
bug Something isn't working priority: low

Comments

@toby-bro
Copy link
Contributor

Describe the bug
When toggling some options the app seems to freeze in the middle of toggling a switch...

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Settings'
  2. Click on Launcher
  3. Scroll down to 'Monochrome app icons'
  4. See error

Expected behavior
I would expect the switch to finish toggling before the app starts its computations of changing the apps icons' color... And the change to happen in background

@toby-bro toby-bro added the bug Something isn't working label Sep 11, 2024
@jrpie
Copy link
Owner

jrpie commented Sep 14, 2024

And the change to happen in background

There is not really a good way to do this, as changing the theme is inherently a UI-related thing.

I really want to use Android themes for theming as this makes the code a lot cleaner. (Finn was working around this by setting the color of every single UI element manually, see for example this code).

In order to modify the actual theme one needs to restart the activity which is what causes the delay.

The only thing I could do here is to update the theme only when the user leaves the settings activity. But then there would be no instantaneous feedback to the user.

On the devices I tested this so far, the delay was noticable but not too bad. I think the current solution is the best tradeoff here.

The only real improvement can come from making the settings activity more performant in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: low
Projects
None yet
Development

No branches or pull requests

2 participants