From 69252ae8a42d5351d93ebf89a190d39146c240eb Mon Sep 17 00:00:00 2001 From: FooIbar <118464521+FooIbar@users.noreply.github.com> Date: Fri, 22 Dec 2023 14:34:48 +0800 Subject: [PATCH] Fix old download label not displayed when renaming --- .../main/kotlin/com/hippo/ehviewer/ui/screen/DownloadsScreen.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/DownloadsScreen.kt b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/DownloadsScreen.kt index dbadb9421..2ab5e216e 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/DownloadsScreen.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/DownloadsScreen.kt @@ -277,7 +277,7 @@ fun DownloadsScreen(navigator: DestinationsNavigator) { IconButton( onClick = { coroutineScope.launch { - val new = dialogState.awaitInputText(title = renameLabel, hint = labelsStr) { text -> + val new = dialogState.awaitInputText(initial = item, title = renameLabel, hint = labelsStr) { text -> when { text.isBlank() -> labelEmpty text == defaultName -> defaultInvalid