Skip to content

Commit

Permalink
Deleted unnecessary logging
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Fontán <[email protected]>
  • Loading branch information
BobbyESP committed Jul 29, 2024
1 parent 88d6479 commit 2abdf03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.PickVisualMediaRequest
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.animation.Crossfade
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.tween
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
Expand All @@ -15,6 +16,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
Expand Down Expand Up @@ -162,6 +164,12 @@ fun MetadataEditorPage(
}
},
) { innerPadding ->

val animatedBottomPadding by animateDpAsState(
targetValue = if (scaffoldState.bottomSheetState.isVisible) innerPadding.calculateBottomPadding() + 6.dp else 0.dp,
label = "animatedBottomPadding"
)

Crossfade(
targetState = pageState.pageState,
animationSpec = tween(175),
Expand Down Expand Up @@ -236,11 +244,7 @@ fun MetadataEditorPage(

if (pageState.metadata is ResourceState.Success) {
SongProperties(pageState.mutablePropertiesMap)
//Lo iremos modificando en cada cambio que se realicen en los textfields
//Cuando le demos a guardar, se enviará el mapa mutable al view model, que se encargará de
//guardar los cambios en el archivo de audio.
//Si se cancela, se descartarán los cambios (mostrar un dialogo de confirmación antes)
//y se cerrará la pantalla.
Spacer(modifier = Modifier.height(animatedBottomPadding))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,7 @@ class MetadataEditorVM @Inject constructor(
}

private fun updateMapProperty(key: String, value: String) {
Log.i("MetadataEditorVM", "Updating property $key with value $value")
mutableState.value.mutablePropertiesMap[key] = value
//check
Log.i(
"MetadataEditorVM",
"Property $key has value ${mutableState.value.mutablePropertiesMap[key]}"
)
}

fun savePropertyMap(
Expand Down

0 comments on commit 2abdf03

Please sign in to comment.