diff --git a/.claude/settings.local.json b/.claude/settings.local.json index da02c02..396654a 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -6,7 +6,8 @@ "Bash(git push:*)", "WebFetch(domain:github.com)", "WebFetch(domain:raw.githubusercontent.com)", - "Bash(dir:*)" + "Bash(dir:*)", + "Bash(./gradlew assembleDebug:*)" ], "deny": [], "ask": [] diff --git a/app/src/main/java/com/anthonyla/paperize/presentation/screens/wallpaper/WallpaperScreen.kt b/app/src/main/java/com/anthonyla/paperize/presentation/screens/wallpaper/WallpaperScreen.kt index 286cb1d..c1a7a99 100644 --- a/app/src/main/java/com/anthonyla/paperize/presentation/screens/wallpaper/WallpaperScreen.kt +++ b/app/src/main/java/com/anthonyla/paperize/presentation/screens/wallpaper/WallpaperScreen.kt @@ -645,7 +645,11 @@ fun WallpaperScreen( // Grayscale SettingSwitch( title = R.string.gray_filter, - description = R.string.make_the_colors_grayscale, + description = if (when { + homeEnabled && lockEnabled -> scheduleSettings.homeEffects.enableGrayscale && scheduleSettings.lockEffects.enableGrayscale + homeEnabled -> scheduleSettings.homeEffects.enableGrayscale + else -> scheduleSettings.lockEffects.enableGrayscale + } && !scheduleSettings.separateSchedules) null else R.string.make_the_colors_grayscale, checked = when { homeEnabled && lockEnabled -> scheduleSettings.homeEffects.enableGrayscale && scheduleSettings.lockEffects.enableGrayscale homeEnabled -> scheduleSettings.homeEffects.enableGrayscale @@ -664,7 +668,7 @@ fun WallpaperScreen( // Adaptive Brightness SettingSwitch( title = R.string.adaptive_brightness, - description = R.string.adjust_brightness_based_on_mode, + description = if (scheduleSettings.adaptiveBrightness && !scheduleSettings.separateSchedules) null else R.string.adjust_brightness_based_on_mode, checked = scheduleSettings.adaptiveBrightness, onCheckedChange = { enabled -> onUpdateScheduleSettings(scheduleSettings.copy(adaptiveBrightness = enabled)) @@ -674,7 +678,7 @@ fun WallpaperScreen( // Shuffle SettingSwitch( title = R.string.shuffle, - description = R.string.randomly_shuffle_the_wallpapers, + description = if (scheduleSettings.shuffleEnabled && !scheduleSettings.separateSchedules) null else R.string.randomly_shuffle_the_wallpapers, checked = scheduleSettings.shuffleEnabled, onCheckedChange = { enabled -> onUpdateScheduleSettings(scheduleSettings.copy(shuffleEnabled = enabled)) diff --git a/app/src/main/java/com/anthonyla/paperize/presentation/screens/wallpaper/components/SettingSwitch.kt b/app/src/main/java/com/anthonyla/paperize/presentation/screens/wallpaper/components/SettingSwitch.kt index 8e22bf6..68373cc 100644 --- a/app/src/main/java/com/anthonyla/paperize/presentation/screens/wallpaper/components/SettingSwitch.kt +++ b/app/src/main/java/com/anthonyla/paperize/presentation/screens/wallpaper/components/SettingSwitch.kt @@ -29,7 +29,7 @@ import com.anthonyla.paperize.presentation.theme.AppSpacing @Composable fun SettingSwitch( @StringRes title: Int, - @StringRes description: Int, + @StringRes description: Int?, checked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier @@ -61,14 +61,16 @@ fun SettingSwitch( maxLines = 2, overflow = TextOverflow.Ellipsis ) - Spacer(modifier = Modifier.height(AppSpacing.extraSmall)) - Text( - text = stringResource(description), - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - maxLines = 3, - overflow = TextOverflow.Ellipsis - ) + description?.let { + Spacer(modifier = Modifier.height(AppSpacing.extraSmall)) + Text( + text = stringResource(it), + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 3, + overflow = TextOverflow.Ellipsis + ) + } } Spacer(modifier = Modifier.width(AppSpacing.large)) Switch(