Fix switch not updating the DB when toggled by sliding instead of clicking it.

Change-Id: I2ff8a6ff8aedc6938b870de17f7c2c426fa421a7