Skip to content

Commit

Permalink
fix: Deleting last character by keyboard wasn't doing nothing on PreC…
Browse files Browse the repository at this point in the history
…onfiguredOutlinedTextField

deps: Updated TagLib to 1.0.0-alpha07

Signed-off-by: Gabriel Fontán <[email protected]>
  • Loading branch information
BobbyESP committed Apr 2, 2024
1 parent 4a47a07 commit 4dae952
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ class ID3MetadataEditorPageViewModel @Inject constructor(
val fd = songFd.dup()?.detachFd() ?: throw IOException("File descriptor is null")
val metadata = TagLib.getMetadata(
fd,
readStyle = AudioPropertiesReadStyle.Fast,
withLyrics = true
readStyle = AudioPropertiesReadStyle.Fast
)
if (metadata == null) {
updateState(ID3MetadataEditorPageState.Error(Exception("Metadata is null")))
return
}

val lyrics = metadata.propertyMap["LYRICS"]?.get(0) ?: ""

updateLyrics(lyrics)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fun PreConfiguredOutlinedTextField(
val (text, setText) = remember(value) { mutableStateOf(value) }

SideEffect {
if (!text.isNullOrEmpty()) returnModifiedValue(text)
if (!text.isNullOrEmpty()) returnModifiedValue(text) else returnModifiedValue("")
}

OutlinedTextField(
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ googleServices = "4.4.1"
firebaseBom = "32.8.0"

#Others
taglib = "84a30a6c70"
taglib = "1.0.0-alpha07"

#Tests
junit = "4.13.2"
Expand Down

0 comments on commit 4dae952

Please sign in to comment.