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)