Skip to content

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

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

Merged
merged 4 commits into from
May 3, 2025

Conversation

FineFindus
Copy link
Contributor

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.

Changes the DimmerSettingsTile to always start from the dimmest mode
if the toch is disabled. Previously it would continue from the last
mode, which was confusing to the user, since suddenly the tile acted
different when tapped.
Fixes an issue, where if the torch was externally disabled, the mode
should continue to show the (now outdated) mode instead of off.
@cyb3rko
Copy link
Owner

cyb3rko commented Sep 9, 2024

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?

@FineFindus
Copy link
Contributor Author

FineFindus commented Sep 9, 2024

Yup, works pretty much perfectly over here, have been testing it since I created the PR (nvm, I thought this was #79. Not sure what you're planning, but it might be better to merge #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.

screen-20240909-222648.trimmed.mp4

@cyb3rko
Copy link
Owner

cyb3rko commented Sep 28, 2024

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 cyb3rko force-pushed the main branch 2 times, most recently from ab94d4e to 1eda79a Compare October 19, 2024 12:25
# Conflicts:
#	app/src/main/kotlin/com/cyb3rko/flashdim/tiles/DimmerSettingsTile.kt
@cyb3rko
Copy link
Owner

cyb3rko commented Apr 12, 2025

@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?

@FineFindus
Copy link
Contributor Author

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

@cyb3rko
Copy link
Owner

cyb3rko commented Apr 12, 2025

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
Copy link
Owner

cyb3rko commented Apr 13, 2025

Could you test again please?

@cyb3rko
Copy link
Owner

cyb3rko commented May 3, 2025

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

@cyb3rko cyb3rko merged commit 996400c into cyb3rko:main May 3, 2025
2 checks passed
@FineFindus FineFindus deleted the fix/qs-tile-dimmer-reset branch May 12, 2025 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants