Skip to content

Commit

Permalink
fixed #204
Browse files Browse the repository at this point in the history
  • Loading branch information
rozPierog committed Jul 31, 2023
1 parent c0c0ea8 commit 689ad53
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import com.omelan.cofi.appDeepLinkUrl
import com.omelan.cofi.components.*
import com.omelan.cofi.model.DataStore
import com.omelan.cofi.model.NEXT_STEP_ENABLED_DEFAULT_VALUE
import com.omelan.cofi.share.*
import com.omelan.cofi.share.COMBINE_WEIGHT_DEFAULT_VALUE
import com.omelan.cofi.share.model.*
import com.omelan.cofi.share.pages.Destinations
import com.omelan.cofi.share.timer.Timer
Expand Down Expand Up @@ -344,6 +344,7 @@ fun RecipeDetails(
.animateItemPlacement()
.padding(bottom = Spacing.normal),
step = nextStep ?: Step(name = "", type = StepType.WAIT),
weightMultiplier, timeMultiplier,
)
}
}
Expand Down
13 changes: 11 additions & 2 deletions app/src/main/java/com/omelan/cofi/pages/details/UpNext.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ import com.omelan.cofi.ui.card
import com.omelan.cofi.ui.shapes

@Composable
fun UpNext(modifier: Modifier = Modifier, step: Step) {
fun UpNext(
modifier: Modifier = Modifier, step: Step,
weightMultiplier: Float = 1f,
timeMultiplier: Float = 1f,
) {
Surface(modifier = modifier.animateContentSize(), shape = shapes.card, tonalElevation = 2.dp) {
Column(
Modifier
Expand All @@ -47,7 +51,12 @@ fun UpNext(modifier: Modifier = Modifier, step: Step) {
},
label = "Next step",
) {
StepListItem(step = it, stepProgress = StepProgress.Upcoming)
StepListItem(
step = it,
stepProgress = StepProgress.Upcoming,
weightMultiplier = weightMultiplier,
timeMultiplier = timeMultiplier,
)
}
}
}
Expand Down
1 change: 1 addition & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- WearOS will now show recipes in the same order as Android
- Improved rotary input on WearOS
- Fixed Up Next not scaling with the recipe multipliers

### Removed

Expand Down

0 comments on commit 689ad53

Please sign in to comment.