From 96d5fab40c1f9c79e0eadd6f81dcfccaa3d4ac85 Mon Sep 17 00:00:00 2001 From: yovinchen Date: Thu, 5 Dec 2024 11:56:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=9F=E4=B8=80=20RecordItem=20?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=80=BB=E8=BE=91=EF=BC=8C=E4=B8=8E=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bookkeeping/ui/components/RecordItem.kt | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/yovinchen/bookkeeping/ui/components/RecordItem.kt b/app/src/main/java/com/yovinchen/bookkeeping/ui/components/RecordItem.kt index 0b41365..cf40b1a 100644 --- a/app/src/main/java/com/yovinchen/bookkeeping/ui/components/RecordItem.kt +++ b/app/src/main/java/com/yovinchen/bookkeeping/ui/components/RecordItem.kt @@ -22,7 +22,6 @@ fun RecordItem( members: List = emptyList() ) { var showDeleteDialog by remember { mutableStateOf(false) } -// val dateFormat = remember { SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()) } val timeFormat = remember { SimpleDateFormat("HH:mm", Locale.getDefault()) } val member = members.find { it.id == record.memberId } @@ -49,18 +48,12 @@ fun RecordItem( style = MaterialTheme.typography.bodyLarge ) - // 第二行:日期和时间 | 成员 | 详情 + // 第二行:时间 | 成员 | 详情 Text( text = buildString { -// append(dateFormat.format(record.date)) -// append(" ") append(timeFormat.format(record.date)) -// if (member != null && member.name != "自己") { - append(" | ") - if (member != null) { - append(member.name) - } -// } + append(" | ") + append(member?.name ?: "自己") if (record.description.isNotEmpty()) { append(" | ") append(record.description)