Skip to content

Commit

Permalink
fix #27: Make hourly forecast data field unclickable in preview mode (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
timklge authored Jan 19, 2025
1 parent cc17117 commit b973dec
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ class WeatherForecastDataType(
}

val result = glance.compose(context, DpSize.Unspecified) {
Row(modifier = GlanceModifier.fillMaxSize().clickable(onClick = actionRunCallback<CycleHoursAction>()), horizontalAlignment = Alignment.Horizontal.CenterHorizontally) {
var modifier = GlanceModifier.fillMaxSize()

if (!config.preview) modifier = modifier.clickable(onClick = actionRunCallback<CycleHoursAction>())

Row(modifier = modifier, horizontalAlignment = Alignment.Horizontal.CenterHorizontally) {
val hourOffset = widgetSettings?.currentForecastHourOffset ?: 0

var previousDate: String? = let {
Expand Down

0 comments on commit b973dec

Please sign in to comment.