更新消息和AI代理页面的文本颜色,注释掉部分消息列表初始化逻辑
This commit is contained in:
@@ -133,7 +133,7 @@ fun Agent() {
|
||||
Text(
|
||||
text = stringResource(R.string.agent_mine),
|
||||
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
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(if (pagerState.currentPage == 0) AppColors.checkedBackground else AppColors.unCheckedBackground)
|
||||
@@ -157,7 +157,7 @@ fun Agent() {
|
||||
Text(
|
||||
text = stringResource(R.string.agent_hot),
|
||||
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
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(if (pagerState.currentPage == 1) AppColors.checkedBackground else AppColors.unCheckedBackground)
|
||||
@@ -181,7 +181,7 @@ fun Agent() {
|
||||
Text(
|
||||
text = stringResource(R.string.agent_recommend),
|
||||
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
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(if (pagerState.currentPage == 2) AppColors.checkedBackground else AppColors.unCheckedBackground)
|
||||
@@ -205,7 +205,7 @@ fun Agent() {
|
||||
Text(
|
||||
text = stringResource(R.string.agent_other),
|
||||
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
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(if (pagerState.currentPage == 3) AppColors.checkedBackground else AppColors.unCheckedBackground)
|
||||
|
||||
@@ -198,7 +198,7 @@ fun NotificationsScreen() {
|
||||
Text(
|
||||
text = stringResource(R.string.chat_ai),
|
||||
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
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(if (pagerState.currentPage == 0) AppColors.checkedBackground else AppColors.unCheckedBackground)
|
||||
@@ -220,7 +220,7 @@ fun NotificationsScreen() {
|
||||
androidx.compose.material.Text(
|
||||
text = stringResource(R.string.chat_group),
|
||||
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
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(if (pagerState.currentPage == 1) AppColors.checkedBackground else AppColors.unCheckedBackground)
|
||||
@@ -244,7 +244,7 @@ fun NotificationsScreen() {
|
||||
androidx.compose.material.Text(
|
||||
text = stringResource(R.string.chat_friend),
|
||||
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
|
||||
.clip(RoundedCornerShape(8.dp))
|
||||
.background(if (pagerState.currentPage == 2) AppColors.checkedBackground else AppColors.unCheckedBackground)
|
||||
|
||||
@@ -84,22 +84,22 @@ object MessageListViewModel : ViewModel() {
|
||||
var unReadConversationCount by mutableStateOf(0L)
|
||||
var isFirstLoad = true
|
||||
suspend fun initData(context: Context, force: Boolean = false, loadChat: Boolean = false) {
|
||||
if (loadChat) {
|
||||
loadChatList(context)
|
||||
loadUnreadCount()
|
||||
}
|
||||
|
||||
if (!isFirstLoad && !force) {
|
||||
return
|
||||
}
|
||||
if (force) {
|
||||
isLoading = true
|
||||
}
|
||||
isFirstLoad = false
|
||||
val info = accountService.getMyNoticeInfo()
|
||||
noticeInfo = info
|
||||
|
||||
isLoading = false
|
||||
// if (loadChat) {
|
||||
// loadChatList(context)
|
||||
// loadUnreadCount()
|
||||
// }
|
||||
//
|
||||
// if (!isFirstLoad && !force) {
|
||||
// return
|
||||
// }
|
||||
// if (force) {
|
||||
// isLoading = true
|
||||
// }
|
||||
// isFirstLoad = false
|
||||
// val info = accountService.getMyNoticeInfo()
|
||||
// noticeInfo = info
|
||||
//
|
||||
// isLoading = false
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user