When you slide a switch in the app settings, the option doesn't change.
When sliding a switch in the app settings the option should change.
Go into the apps settings, to notifications or tracing.
Instead of clicking the switch, drag / slide it manually with your finger.
See that the option did not change.
OnePlus 7 Pro OxygenOS 10 (Android 10)
App version 1.0.0
Add an additional listener, I'll look into it.
Adding a simple OnDragListener wouldn't really work, as the user might start sliding it, but then slide it back, so only having the toggleSetting() function doesn't really help.
We'd either need a setSetting(boolean state) or get the switch position before the user starts sliding and on USER_DRAG_FINISHED (or similar) compare the previous state with the current one and toggle or don't toggle accordingly.
I think setOnCheckedChangeListener is the proper listener for this?
setOnCheckedChangeListener leaves the options quickly flickering on and off for me.
i did some work in #612 can you check if the flickering happens there for you?
This works perfectly, no flickering happening