Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a59f9fb0 authored by Jacky Wang's avatar Jacky Wang
Browse files

Fix MainSwitchPreference

This change simplifies MainSwitchPreference widget significantly and fix
some issues:

- Override setTitle/setSummary/etc to update UI is incorrect.
  Under the hood, notifyChange will be invoked when any change is
  detected and onBindViewHolder is triggered. All the UI binding logic
  must be done within onBindViewHolder.
- The listener is added to MainSwitchBar but never be removed, which
  will cause weird issue (e.g. ag/3645453) when view holder is reused.

Bug: 391092187
Flag: EXEMPT library
Test: atest&manual
Change-Id: I4fc5ad382253c7dade1165487142078e56164941
parent d59304db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment