Skip to content

Commit

Permalink
refactor : 불필요 변수 및 파라미터 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
gogoadl committed Jun 27, 2023
1 parent 292e6d9 commit d1e4800
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ fun CocktailDetails(
var isLoading = true
var currentRotation by remember { mutableFloatStateOf(0f) }
val rotation = remember { Animatable(currentRotation) }
val painter = rememberAsyncImagePainter(model = drink?.strDrinkThumb)
val parsedColor by remember { mutableStateOf<ParsedColor>(ParsedColor()) }

LaunchedEffect(key1 = cocktailId) {
Expand All @@ -126,7 +125,7 @@ fun CocktailDetails(
RotationEffect(isLoading, currentRotation, rotation)
StatusBarColorChangeEffect(parsedColor)
PaletteColorExtractEffect(drink, parsedColor)

if (drink == null) {
LoadingBox(rotation)
} else {
Expand Down Expand Up @@ -158,17 +157,15 @@ fun CocktailDetailsScreen(
)},
) {
Box(modifier = Modifier.padding(it)) {
CocktailDetailsBody(viewModel, drink, parsedColor, pressOnBack)
CocktailDetailsBody(drink, parsedColor)
}
}
}

@Composable
private fun CocktailDetailsBody(
viewModel: DetailViewModel,
drink: Drink,
parsedColor: ParsedColor,
pressOnBack: () -> Unit,
) {

Column(
Expand Down

0 comments on commit d1e4800

Please sign in to comment.