diff --git a/app/src/main/java/ru/n00byara/notificationcode/ui/components/ApplicationInfoSwitch.kt b/app/src/main/java/ru/n00byara/notificationcode/ui/components/ApplicationInfoCheckBox.kt similarity index 96% rename from app/src/main/java/ru/n00byara/notificationcode/ui/components/ApplicationInfoSwitch.kt rename to app/src/main/java/ru/n00byara/notificationcode/ui/components/ApplicationInfoCheckBox.kt index e906c16..6372113 100644 --- a/app/src/main/java/ru/n00byara/notificationcode/ui/components/ApplicationInfoSwitch.kt +++ b/app/src/main/java/ru/n00byara/notificationcode/ui/components/ApplicationInfoCheckBox.kt @@ -23,7 +23,7 @@ import com.google.accompanist.drawablepainter.rememberDrawablePainter import ru.n00byara.notificationcode.Constants import ru.n00byara.notificationcode.application.InstalledAppInfo -data class ApplicationInfoSwitchModel( +data class ApplicationInfoCheckBoxModel( val appInfo: InstalledAppInfo, val checked: Boolean, val setState: (String, Boolean) -> Unit @@ -31,7 +31,7 @@ data class ApplicationInfoSwitchModel( @Composable fun ApplicationInfoCheckBox( - applicationInfoSwitchModel: ApplicationInfoSwitchModel + applicationInfoSwitchModel: ApplicationInfoCheckBoxModel ) { var checkedState by remember { mutableStateOf(applicationInfoSwitchModel.checked) } diff --git a/app/src/main/java/ru/n00byara/notificationcode/ui/screens/ApplicationsScreen.kt b/app/src/main/java/ru/n00byara/notificationcode/ui/screens/ApplicationsScreen.kt index d0f24da..80d91b9 100644 --- a/app/src/main/java/ru/n00byara/notificationcode/ui/screens/ApplicationsScreen.kt +++ b/app/src/main/java/ru/n00byara/notificationcode/ui/screens/ApplicationsScreen.kt @@ -12,7 +12,7 @@ import androidx.compose.ui.unit.dp import ru.n00byara.notificationcode.Constants import ru.n00byara.notificationcode.R import ru.n00byara.notificationcode.ui.components.ApplicationInfoCheckBox -import ru.n00byara.notificationcode.ui.components.ApplicationInfoSwitchModel +import ru.n00byara.notificationcode.ui.components.ApplicationInfoCheckBoxModel import ru.n00byara.notificationcode.ui.viewmodels.ApplicationsScreenViewModel import kotlin.reflect.KFunction1 @@ -27,7 +27,7 @@ fun ApplicationsScreen( itemsIndexed( applicationsScreenViewModel.applications ) { index, appInfo -> - val applicationInfoSwitchModel = ApplicationInfoSwitchModel( + val applicationInfoSwitchModel = ApplicationInfoCheckBoxModel( appInfo = appInfo, checked = applicationsScreenViewModel.getApplicationState(Constants.APPLICATION_PREF + appInfo.packageName), setState = applicationsScreenViewModel::setApplicationState