Skip to content

Commit

Permalink
Fixed naming
Browse files Browse the repository at this point in the history
Fixed in ApplicationInfoCheckBox
  • Loading branch information
n00byara committed May 14, 2024
1 parent 5bec12d commit a34c4e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ 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
)

@Composable
fun ApplicationInfoCheckBox(
applicationInfoSwitchModel: ApplicationInfoSwitchModel
applicationInfoSwitchModel: ApplicationInfoCheckBoxModel
) {
var checkedState by remember { mutableStateOf(applicationInfoSwitchModel.checked) }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit a34c4e3

Please sign in to comment.