kojofosu / Quantitizer

:sparkles: A quantity stepper for android projects
MIT License
190 stars 18 forks source link

Text doesn't reflect accurate quantity if button is pressed fast #9

Open sanskar10100 opened 2 years ago

sanskar10100 commented 2 years ago

Hey @kojofosu, thanks for the awesome lib. Really appreciate your work.

I added version 1.6.4 to an app that I'm building, and I observed that the quantity text doesn't accurately reflect how many times the plus button is clicked. Check this screen capture: https://user-images.githubusercontent.com/22092047/148506863-425bafb7-298c-49ea-ba0f-846c1b0a1f15.mp4

But the log indicates that the current quantity has bumped up to 36, instead of 19, which is what's displayed in the text.

2022-01-07 12:49:06.252 20694-20694/com.sanskar.app D/App: Quantity Increased, now item: InventoryItem(maxQuantity=50, name=Perk, price=50, currentQuantity=35)
2022-01-07 12:49:06.393 20694-20694/com.sanskar.app D/App: Quantity Increased, now item: InventoryItem(maxQuantity=50, name=Perk, price=50, currentQuantity=36)

I know it's extremely unlikely that a potential user will perform this kind of action in the app, but I'd still like to prevent any issues in the future. Let me know if I can do anything to fix this issue.

Thanks!

kojofosu commented 2 years ago

I see... will take a look at it for you.

sanskar10100 commented 2 years ago

There's one more thing: Is it possible to set a listener of some sort on manual value input? Because I'd like to update some other values when a manual quantity is set. Please let me know!

kojofosu commented 2 years ago

sure...that makes sense.. will look into that aswell