更新消息和AI代理页面的文本颜色,注释掉部分消息列表初始化逻辑

This commit is contained in:
2025-08-05 16:51:17 +08:00
parent 91c34a0acf
commit dc9c013383
3 changed files with 23 additions and 23 deletions

View File

@@ -133,7 +133,7 @@ fun Agent() {
Text( Text(
text = stringResource(R.string.agent_mine), text = stringResource(R.string.agent_mine),
fontSize = 14.sp, fontSize = 14.sp,
color = if (pagerState.currentPage == 0) AppColors.mainText else AppColors.checkedBackground, color = if (pagerState.currentPage == 0) AppColors.checkedText else AppColors.text,
modifier = Modifier modifier = Modifier
.clip(RoundedCornerShape(8.dp)) .clip(RoundedCornerShape(8.dp))
.background(if (pagerState.currentPage == 0) AppColors.checkedBackground else AppColors.unCheckedBackground) .background(if (pagerState.currentPage == 0) AppColors.checkedBackground else AppColors.unCheckedBackground)
@@ -157,7 +157,7 @@ fun Agent() {
Text( Text(
text = stringResource(R.string.agent_hot), text = stringResource(R.string.agent_hot),
fontSize = 14.sp, fontSize = 14.sp,
color = if (pagerState.currentPage == 1) AppColors.mainText else AppColors.checkedBackground, color = if (pagerState.currentPage == 1) AppColors.checkedText else AppColors.text,
modifier = Modifier modifier = Modifier
.clip(RoundedCornerShape(8.dp)) .clip(RoundedCornerShape(8.dp))
.background(if (pagerState.currentPage == 1) AppColors.checkedBackground else AppColors.unCheckedBackground) .background(if (pagerState.currentPage == 1) AppColors.checkedBackground else AppColors.unCheckedBackground)
@@ -181,7 +181,7 @@ fun Agent() {
Text( Text(
text = stringResource(R.string.agent_recommend), text = stringResource(R.string.agent_recommend),
fontSize = 14.sp, fontSize = 14.sp,
color = if (pagerState.currentPage == 2) AppColors.mainText else AppColors.checkedBackground, color = if (pagerState.currentPage == 2) AppColors.checkedText else AppColors.text,
modifier = Modifier modifier = Modifier
.clip(RoundedCornerShape(8.dp)) .clip(RoundedCornerShape(8.dp))
.background(if (pagerState.currentPage == 2) AppColors.checkedBackground else AppColors.unCheckedBackground) .background(if (pagerState.currentPage == 2) AppColors.checkedBackground else AppColors.unCheckedBackground)
@@ -205,7 +205,7 @@ fun Agent() {
Text( Text(
text = stringResource(R.string.agent_other), text = stringResource(R.string.agent_other),
fontSize = 14.sp, fontSize = 14.sp,
color = if (pagerState.currentPage == 3) AppColors.mainText else AppColors.checkedBackground, color = if (pagerState.currentPage == 3) AppColors.checkedText else AppColors.text,
modifier = Modifier modifier = Modifier
.clip(RoundedCornerShape(8.dp)) .clip(RoundedCornerShape(8.dp))
.background(if (pagerState.currentPage == 3) AppColors.checkedBackground else AppColors.unCheckedBackground) .background(if (pagerState.currentPage == 3) AppColors.checkedBackground else AppColors.unCheckedBackground)

View File

@@ -198,7 +198,7 @@ fun NotificationsScreen() {
Text( Text(
text = stringResource(R.string.chat_ai), text = stringResource(R.string.chat_ai),
fontSize = 14.sp, fontSize = 14.sp,
color = if (pagerState.currentPage == 0) AppColors.mainText else AppColors.checkedBackground, color = if (pagerState.currentPage == 0) AppColors.checkedText else AppColors.text,
modifier = Modifier modifier = Modifier
.clip(RoundedCornerShape(8.dp)) .clip(RoundedCornerShape(8.dp))
.background(if (pagerState.currentPage == 0) AppColors.checkedBackground else AppColors.unCheckedBackground) .background(if (pagerState.currentPage == 0) AppColors.checkedBackground else AppColors.unCheckedBackground)
@@ -220,7 +220,7 @@ fun NotificationsScreen() {
androidx.compose.material.Text( androidx.compose.material.Text(
text = stringResource(R.string.chat_group), text = stringResource(R.string.chat_group),
fontSize = 14.sp, fontSize = 14.sp,
color = if (pagerState.currentPage == 1) AppColors.mainText else AppColors.checkedBackground, color = if (pagerState.currentPage == 1) AppColors.checkedText else AppColors.text,
modifier = Modifier modifier = Modifier
.clip(RoundedCornerShape(8.dp)) .clip(RoundedCornerShape(8.dp))
.background(if (pagerState.currentPage == 1) AppColors.checkedBackground else AppColors.unCheckedBackground) .background(if (pagerState.currentPage == 1) AppColors.checkedBackground else AppColors.unCheckedBackground)
@@ -244,7 +244,7 @@ fun NotificationsScreen() {
androidx.compose.material.Text( androidx.compose.material.Text(
text = stringResource(R.string.chat_friend), text = stringResource(R.string.chat_friend),
fontSize = 14.sp, fontSize = 14.sp,
color = if (pagerState.currentPage == 2) AppColors.mainText else AppColors.checkedBackground, color = if (pagerState.currentPage == 2) AppColors.checkedText else AppColors.text,
modifier = Modifier modifier = Modifier
.clip(RoundedCornerShape(8.dp)) .clip(RoundedCornerShape(8.dp))
.background(if (pagerState.currentPage == 2) AppColors.checkedBackground else AppColors.unCheckedBackground) .background(if (pagerState.currentPage == 2) AppColors.checkedBackground else AppColors.unCheckedBackground)

View File

@@ -84,22 +84,22 @@ object MessageListViewModel : ViewModel() {
var unReadConversationCount by mutableStateOf(0L) var unReadConversationCount by mutableStateOf(0L)
var isFirstLoad = true var isFirstLoad = true
suspend fun initData(context: Context, force: Boolean = false, loadChat: Boolean = false) { suspend fun initData(context: Context, force: Boolean = false, loadChat: Boolean = false) {
if (loadChat) { // if (loadChat) {
loadChatList(context) // loadChatList(context)
loadUnreadCount() // loadUnreadCount()
} // }
//
if (!isFirstLoad && !force) { // if (!isFirstLoad && !force) {
return // return
} // }
if (force) { // if (force) {
isLoading = true // isLoading = true
} // }
isFirstLoad = false // isFirstLoad = false
val info = accountService.getMyNoticeInfo() // val info = accountService.getMyNoticeInfo()
noticeInfo = info // noticeInfo = info
//
isLoading = false // isLoading = false
} }