1.2.4稳定版 #3

Merged
yovinchen merged 40 commits from develop into master 2024-12-05 16:52:26 +08:00
Showing only changes of commit 96d5fab40c - Show all commits

View File

@ -22,7 +22,6 @@ fun RecordItem(
members: List<Member> = emptyList() members: List<Member> = emptyList()
) { ) {
var showDeleteDialog by remember { mutableStateOf(false) } var showDeleteDialog by remember { mutableStateOf(false) }
// val dateFormat = remember { SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()) }
val timeFormat = remember { SimpleDateFormat("HH:mm", Locale.getDefault()) } val timeFormat = remember { SimpleDateFormat("HH:mm", Locale.getDefault()) }
val member = members.find { it.id == record.memberId } val member = members.find { it.id == record.memberId }
@ -49,18 +48,12 @@ fun RecordItem(
style = MaterialTheme.typography.bodyLarge style = MaterialTheme.typography.bodyLarge
) )
// 第二行:日期和时间 | 成员 | 详情 // 第二行:时间 | 成员 | 详情
Text( Text(
text = buildString { text = buildString {
// append(dateFormat.format(record.date))
// append(" ")
append(timeFormat.format(record.date)) append(timeFormat.format(record.date))
// if (member != null && member.name != "自己") {
append(" | ") append(" | ")
if (member != null) { append(member?.name ?: "自己")
append(member.name)
}
// }
if (record.description.isNotEmpty()) { if (record.description.isNotEmpty()) {
append(" | ") append(" | ")
append(record.description) append(record.description)