fix: 恢复首页时钟不带秒 + TTS备注读取修复
1. 首页时钟恢复 HH:mm 格式 2. TTS备注改为优先读 taskRequire,没有则读 content(和页面显示一致) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -367,7 +367,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
|
||||
/** 更新时钟和日期 */
|
||||
private fun updateClock() {
|
||||
val info = DateUtil.getDateInfo()
|
||||
tvClock.text = DateUtil.formatTime()
|
||||
tvClock.text = DateUtil.formatTimeShort()
|
||||
tvDate.text = "${info.month}月${info.day}日 ${info.week}"
|
||||
// 同步更新打卡面板时钟
|
||||
if (punchPanel.isShowing) {
|
||||
|
||||
@@ -315,7 +315,12 @@ class TaskDetailFragment : BaseFragment<FragmentTaskDetailBinding>() {
|
||||
!detail.expireTime.isNullOrEmpty() -> parts.add("截止时间:${formatTimeForTts(detail.expireTime!!)}")
|
||||
}
|
||||
if (detail.point > 0) parts.add("积分:${detail.point.toInt()}分")
|
||||
if (detail.content.isNotBlank()) parts.add("备注:${detail.content}")
|
||||
val note = when {
|
||||
!detail.taskRequire.isNullOrEmpty() -> detail.taskRequire
|
||||
detail.content.isNotEmpty() -> detail.content
|
||||
else -> null
|
||||
}
|
||||
if (!note.isNullOrBlank()) parts.add("备注:$note")
|
||||
|
||||
if (parts.isEmpty()) return
|
||||
|
||||
|
||||
@@ -1042,7 +1042,13 @@ class TaskListFragment : BaseFragment<FragmentTaskListBinding>() {
|
||||
!detail.expireTime.isNullOrEmpty() -> parts.add("截止时间:${formatTimeForTts(detail.expireTime!!)}")
|
||||
}
|
||||
if (detail.point > 0) parts.add("积分:${detail.point.toInt()}分")
|
||||
if (detail.content.isNotBlank()) parts.add("备注:${detail.content}")
|
||||
// 备注:优先 taskRequire,没有则用 content(和页面显示逻辑一致)
|
||||
val note = when {
|
||||
!detail.taskRequire.isNullOrEmpty() -> detail.taskRequire
|
||||
detail.content.isNotEmpty() -> detail.content
|
||||
else -> null
|
||||
}
|
||||
if (!note.isNullOrBlank()) parts.add("备注:$note")
|
||||
|
||||
if (parts.isEmpty()) return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user