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

Commit 8e90390c authored by chihhangchuang's avatar chihhangchuang
Browse files

Make custom theme remember current selection

System config changes:
Before https://drive.google.com/file/d/1bkcEAn3Ov1BIWu9Ukv0HzHexeNjGCcTD/view?usp=sharing
After https://drive.google.com/file/d/1YW4qpNInycrvMfCT6s_akU2iNofnWR_s/view?usp=sharing

Go previous page:
Before https://drive.google.com/file/d/1NhAErfV_aI-B8Yra1FLzJDyw4VkhDwk1/view?usp=sharing
After https://drive.google.com/file/d/1X1lVGgiYIqhyJ2eWEuyvXL7Or_lrFoqx/view?usp=sharing

We need to handle the case of going previous page bacause users may not feel satisfied the custom theme from seeing the new preview in the naming page, then user would go previous page to update the selections.

Test: Manually
Fixes: 157631127
Change-Id: I67907f078bd47fd93ae40e12f4da4b69c5572860
parent 3a120b7c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -98,6 +98,9 @@ public class CustomThemeComponentFragment extends CustomThemeStepFragment {
            mOptionsController.addListener(selected -> {
                mSelectedOption = (ThemeComponentOption) selected;
                bindPreview();
                // Preview and apply. The selection will be kept whatever user goes to previous page
                // or encounter system config changes, the current selection can be recovered.
                mCustomThemeManager.apply(mSelectedOption, /* callback= */ null);
            });
            mOptionsController.initOptions(mCustomThemeManager);