@@ -1667,7 +1667,10 @@ fun AppearanceSettingsContent(
16671667 }
16681668
16691669 if (showHomeLayoutChooseDialog.value) {
1670- HomeLayoutChooseDialog (showHomeLayoutChooseDialog)
1670+ HomeLayoutChooseDialog (showHomeLayoutChooseDialog) { selectedLayout ->
1671+ currentStyle = selectedLayout
1672+ refreshTheme.value = true
1673+ }
16711674 }
16721675
16731676 if (showNavSchemeDialog) {
@@ -1860,7 +1863,7 @@ fun ThemeChooseDialog(showDialog: MutableState<Boolean>) {
18601863
18611864@OptIn(ExperimentalMaterial3Api ::class )
18621865@Composable
1863- fun HomeLayoutChooseDialog (showDialog : MutableState <Boolean >) {
1866+ fun HomeLayoutChooseDialog (showDialog : MutableState <Boolean >, onLayoutSelected : ( String ) -> Unit ) {
18641867 val prefs = APApplication .sharedPreferences
18651868
18661869 BasicAlertDialog (
@@ -1902,6 +1905,7 @@ fun HomeLayoutChooseDialog(showDialog: MutableState<Boolean>) {
19021905 },
19031906 modifier = Modifier .clickable {
19041907 prefs.edit().putString(" home_layout_style" , " default" ).apply ()
1908+ onLayoutSelected(" default" )
19051909 showDialog.value = false
19061910 }
19071911 )
@@ -1916,6 +1920,7 @@ fun HomeLayoutChooseDialog(showDialog: MutableState<Boolean>) {
19161920 },
19171921 modifier = Modifier .clickable {
19181922 prefs.edit().putString(" home_layout_style" , " kernelsu" ).apply ()
1923+ onLayoutSelected(" kernelsu" )
19191924 showDialog.value = false
19201925 }
19211926 )
@@ -1930,6 +1935,7 @@ fun HomeLayoutChooseDialog(showDialog: MutableState<Boolean>) {
19301935 },
19311936 modifier = Modifier .clickable {
19321937 prefs.edit().putString(" home_layout_style" , " focus" ).apply ()
1938+ onLayoutSelected(" focus" )
19331939 showDialog.value = false
19341940 }
19351941 )
@@ -1944,6 +1950,7 @@ fun HomeLayoutChooseDialog(showDialog: MutableState<Boolean>) {
19441950 },
19451951 modifier = Modifier .clickable {
19461952 prefs.edit().putString(" home_layout_style" , " sign" ).apply ()
1953+ onLayoutSelected(" sign" )
19471954 showDialog.value = false
19481955 }
19491956 )
@@ -1958,6 +1965,7 @@ fun HomeLayoutChooseDialog(showDialog: MutableState<Boolean>) {
19581965 },
19591966 modifier = Modifier .clickable {
19601967 prefs.edit().putString(" home_layout_style" , " circle" ).apply ()
1968+ onLayoutSelected(" circle" )
19611969 showDialog.value = false
19621970 }
19631971 )
@@ -1972,6 +1980,7 @@ fun HomeLayoutChooseDialog(showDialog: MutableState<Boolean>) {
19721980 },
19731981 modifier = Modifier .clickable {
19741982 prefs.edit().putString(" home_layout_style" , " dashboard_ui" ).apply ()
1983+ onLayoutSelected(" dashboard_ui" )
19751984 showDialog.value = false
19761985 }
19771986 )
@@ -1986,6 +1995,7 @@ fun HomeLayoutChooseDialog(showDialog: MutableState<Boolean>) {
19861995 },
19871996 modifier = Modifier .clickable {
19881997 prefs.edit().putString(" home_layout_style" , " stats" ).apply ()
1998+ onLayoutSelected(" stats" )
19891999 showDialog.value = false
19902000 }
19912001 )
0 commit comments