Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbel committed Apr 5, 2024
1 parent 6c79add commit 11fa496
Showing 1 changed file with 48 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ internal fun SettingsScreenContent(
)
}
}
if (settingsData.notificationsData.isFeatureEnabled) {
if (settingsData.appIconData.isFeatureEnabled) {
item {
HorizontalDivider(
modifier = Modifier.padding(horizontal = 16.dp, vertical = 4.dp),
Expand All @@ -293,16 +293,44 @@ internal fun SettingsScreenContent(
)
}
item {
SettingSwitchItem(
title = stringResource(MoviesStrings.settings_post_notifications),
description = stringResource(if (settingsData.notificationsData.isEnabled) MoviesStrings.settings_post_notifications_granted else MoviesStrings.settings_post_notifications_denied),
icon = MoviesIcons.Notifications,
checked = settingsData.notificationsData.isEnabled,
onClick = settingsData.notificationsData.onClick
Text(
text = stringResource(MoviesStrings.settings_app_launcher_icon),
modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp),
style = MaterialTheme.typography.titleLarge.copy(MaterialTheme.colorScheme.onPrimaryContainer)
)
}
item {
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.Center
) {
SettingAppIcon(
iconAlias = IconAlias.Red,
isEnabled = settingsData.appIconData.current == IconAlias.Red,
onClick = settingsData.appIconData.onSelect
)

SettingAppIcon(
iconAlias = IconAlias.Purple,
isEnabled = settingsData.appIconData.current == IconAlias.Purple,
onClick = settingsData.appIconData.onSelect
)

SettingAppIcon(
iconAlias = IconAlias.Brown,
isEnabled = settingsData.appIconData.current == IconAlias.Brown,
onClick = settingsData.appIconData.onSelect
)

SettingAppIcon(
iconAlias = IconAlias.Amoled,
isEnabled = settingsData.appIconData.current == IconAlias.Amoled,
onClick = settingsData.appIconData.onSelect
)
}
}
}
if (settingsData.biometricData.isFeatureEnabled) {
if (settingsData.notificationsData.isFeatureEnabled) {
item {
HorizontalDivider(
modifier = Modifier.padding(horizontal = 16.dp, vertical = 4.dp),
Expand All @@ -312,11 +340,11 @@ internal fun SettingsScreenContent(
}
item {
SettingSwitchItem(
title = stringResource(MoviesStrings.settings_lock_app),
description = stringResource(if (settingsData.biometricData.isEnabled) MoviesStrings.settings_biometric_added else MoviesStrings.settings_biometric_not_added),
icon = MoviesIcons.Fingerprint,
checked = settingsData.biometricData.isEnabled,
onClick = { settingsData.biometricData.onChange(!settingsData.biometricData.isEnabled) }
title = stringResource(MoviesStrings.settings_post_notifications),
description = stringResource(if (settingsData.notificationsData.isEnabled) MoviesStrings.settings_post_notifications_granted else MoviesStrings.settings_post_notifications_denied),
icon = MoviesIcons.Notifications,
checked = settingsData.notificationsData.isEnabled,
onClick = settingsData.notificationsData.onClick
)
}
}
Expand Down Expand Up @@ -354,7 +382,7 @@ internal fun SettingsScreenContent(
)
}
}
if (settingsData.appIconData.isFeatureEnabled) {
if (settingsData.biometricData.isFeatureEnabled) {
item {
HorizontalDivider(
modifier = Modifier.padding(horizontal = 16.dp, vertical = 4.dp),
Expand All @@ -363,42 +391,14 @@ internal fun SettingsScreenContent(
)
}
item {
Text(
text = stringResource(MoviesStrings.settings_app_launcher_icon),
modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp),
style = MaterialTheme.typography.titleLarge.copy(MaterialTheme.colorScheme.onPrimaryContainer)
SettingSwitchItem(
title = stringResource(MoviesStrings.settings_lock_app),
description = stringResource(if (settingsData.biometricData.isEnabled) MoviesStrings.settings_biometric_added else MoviesStrings.settings_biometric_not_added),
icon = MoviesIcons.Fingerprint,
checked = settingsData.biometricData.isEnabled,
onClick = { settingsData.biometricData.onChange(!settingsData.biometricData.isEnabled) }
)
}
item {
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.Center
) {
SettingAppIcon(
iconAlias = IconAlias.Red,
isEnabled = settingsData.appIconData.current == IconAlias.Red,
onClick = settingsData.appIconData.onSelect
)

SettingAppIcon(
iconAlias = IconAlias.Purple,
isEnabled = settingsData.appIconData.current == IconAlias.Purple,
onClick = settingsData.appIconData.onSelect
)

SettingAppIcon(
iconAlias = IconAlias.Brown,
isEnabled = settingsData.appIconData.current == IconAlias.Brown,
onClick = settingsData.appIconData.onSelect
)

SettingAppIcon(
iconAlias = IconAlias.Amoled,
isEnabled = settingsData.appIconData.current == IconAlias.Amoled,
onClick = settingsData.appIconData.onSelect
)
}
}
}
if (settingsData.screenshotData.isFeatureEnabled) {
item {
Expand Down

0 comments on commit 11fa496

Please sign in to comment.