elastic-rock / Candle

An Android display torch
GNU General Public License v3.0
23 stars 3 forks source link

Cannot stop candle effect because stop button is hidden behind bottom sheet #7

Closed saltsoftdrink closed 7 months ago

saltsoftdrink commented 8 months ago

If we turn on random colors it doesn't get turn off

elastic-rock commented 8 months ago

Could you please make a screen recording and upload it here? Thank you.

bojidar-bg commented 7 months ago

Can confirm. Here's a recording of me fighting with the birthday candle button; after I turn it on, no amount of pressing buttons ever stops the rotation of orange hue other than quitting the app altogether.

gif-20240308-180229

Thanks for making this, BTW! Was looking for a quick floodlight for a project, and this is coming in clutch :blush: :green_heart:

bojidar-bg commented 7 months ago

Ooh.. looking at the code, I can see you call stopCandleEffect when the Settings button is pressed, and indeed that one works! XD The issue here seems to be that once the animation starts, the scaffold remains open, and thus we don't even see that there is a "Stop" button behind it. :sweat_smile: You probably want to contract the scaffold around startCandleEffect (scope.launch { scaffoldState.bottomSheetState.collapse() }?), or add stopCandleEffect calls for each of the buttons and the two color sliders when moved manually. (:

elastic-rock commented 7 months ago

Thank you @bojidar-bg for clarifying the issue. The issue is now fixed by making the bottom sheet collapse once the candle effect starts.