LeoColman / Petals

🌻 The Open Source app Petals aims to help its users to either quit weed, reduce usage or simply know how much they're using.
GNU Affero General Public License v3.0
80 stars 31 forks source link

Milliseconds bar blink in and out of existence when it's disabled #583

Closed LeoColman closed 3 months ago

LeoColman commented 3 months ago

Related to #581

The milliseconds bar still appears for a moment before the rest of the screen is rendered.

https://github.com/LeoColman/Petals/blob/f86989a62276e6e259c340037e54bc3277f94a96/app/src/main/kotlin/br/com/colman/petals/settings/SettingsRepository.kt#L30

This line is likely the reason. If the state starts at "Disabled" and not "Enabled" this issue won't manifest.

https://github.com/LeoColman/Petals/blob/f86989a62276e6e259c340037e54bc3277f94a96/app/src/main/kotlin/br/com/colman/petals/use/LastUseDateTimer.kt#L94

LeoColman commented 3 months ago

Also an opportunity to fix a little bit of #120 . There are plenty of hardcoded strings here