flashdim icon indicating copy to clipboard operation
flashdim copied to clipboard

feat(Tile/Dimmer): restart cycle if torch was disabled

Open FineFindus opened this issue 1 year ago • 3 comments

Changes the DimmerSettingsTile to always start from the dimmest mode when the torch is disabled. Previously it would continue from the last mode, which was confusing for the user as the tile would suddenly behave differently when tapped. This could happen if the user was using the tile and then disabled the torch through another application (e.g., the At a Glance widget on Pixels). The tile will also update to show if the torch has been disabled by other means.

FineFindus avatar Aug 06 '24 13:08 FineFindus

Hi, thanks for your contribution.
I've tested your PR but it seems the cycle is still a bit weird (it goes from "Off" to "Max" to "Half" to "Max" to "Min" or something):

https://i.imgur.com/Etr6vvx.mp4

Does it work on your side?

cyb3rko avatar Sep 09 '24 20:09 cyb3rko

Yup, works pretty much perfectly over here, ~~have been testing it since I created the PR~~ (nvm, I thought this was https://github.com/cyb3rko/flashdim/pull/79. Not sure what you're planning, but it might be better to merge https://github.com/cyb3rko/flashdim/pull/79 instead of this one, as it completely replaces the changes made in this PR). Maybe it's a problem with the old state save interfering? I had some of these problems during development, but managed to fix them at some point.

https://github.com/user-attachments/assets/8a879495-3566-476c-bf6d-fa97c801531a

FineFindus avatar Sep 09 '24 20:09 FineFindus

I've investigated this issue and it seems that the settings tiles work fine without problems when being used on their one, so by not having both of them in the quick settings pane.

I will take a look at #79 and try to fix this issue there.

cyb3rko avatar Sep 28 '24 20:09 cyb3rko

@FineFindus I tried to apply your changes to the current state of the app. Could you please test out if it works for you as expected?

cyb3rko avatar Apr 12 '25 08:04 cyb3rko

The reset works, however both the min and half stage now show the text of the half stage.

FineFindus avatar Apr 12 '25 09:04 FineFindus

Thank you. I think I've found the fix, will test it in a bit.
Then you can test again and we can finally merge.

cyb3rko avatar Apr 12 '25 12:04 cyb3rko

Could you test again please?

cyb3rko avatar Apr 13 '25 14:04 cyb3rko

Works fine for me now, I will merge it.
If you find problems in the future with the implementation, please let me know.

cyb3rko avatar May 03 '25 15:05 cyb3rko