diff --git a/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/message/MessageList.kt b/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/message/MessageList.kt index 40ed75c..5ab124c 100644 --- a/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/message/MessageList.kt +++ b/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/message/MessageList.kt @@ -86,7 +86,7 @@ fun NotificationsScreen() { ) { NotificationIndicator( MessageListViewModel.likeNoticeCount, - R.drawable.rider_pro_like, + R.drawable.rider_pro_moment_like, stringResource(R.string.like_upper) ) { if (MessageListViewModel.likeNoticeCount > 0) { diff --git a/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/profile/ProfileWrap.kt b/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/profile/ProfileWrap.kt index 13b74e1..99eb86c 100644 --- a/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/profile/ProfileWrap.kt +++ b/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/profile/ProfileWrap.kt @@ -22,6 +22,6 @@ fun ProfileWrap( MyProfileViewModel.logout(context) }, profile = MyProfileViewModel.profile, - sharedFlow = MyProfileViewModel.sharedFlow + sharedFlow = MyProfileViewModel.sharedFlow, ) } \ No newline at end of file diff --git a/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/profile/composable/UserItem.kt b/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/profile/composable/UserItem.kt index 67173ee..2d8f191 100644 --- a/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/profile/composable/UserItem.kt +++ b/app/src/main/java/com/aiosman/riderpro/ui/index/tabs/profile/composable/UserItem.kt @@ -120,12 +120,19 @@ fun UserItem(accountProfileEntity: AccountProfileEntity) { ) Spacer(modifier = Modifier.height(4.dp)) // 个人简介 - Text( - text = accountProfileEntity.bio, - fontSize = 14.sp, - color = Color.Gray - ) - + if (accountProfileEntity.bio.isNotEmpty()){ + Text( + text = accountProfileEntity.bio, + fontSize = 14.sp, + color = Color.Gray + ) + }else{ + Text( + text = "No bio here.", + fontSize = 14.sp, + color = Color.Gray + ) + } } } \ No newline at end of file diff --git a/app/src/main/java/com/aiosman/riderpro/ui/profile/AccountProfileV2.kt b/app/src/main/java/com/aiosman/riderpro/ui/profile/AccountProfileV2.kt index f9ac8a5..50dce79 100644 --- a/app/src/main/java/com/aiosman/riderpro/ui/profile/AccountProfileV2.kt +++ b/app/src/main/java/com/aiosman/riderpro/ui/profile/AccountProfileV2.kt @@ -1,10 +1,12 @@ package com.aiosman.riderpro.ui.profile +import android.util.Log import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.lifecycle.viewmodel.compose.viewModel import com.aiosman.riderpro.LocalNavController import com.aiosman.riderpro.exp.viewModelFactory +import com.aiosman.riderpro.ui.index.tabs.profile.MyProfileViewModel import com.aiosman.riderpro.ui.index.tabs.profile.ProfileV3 import com.aiosman.riderpro.ui.navigateToChat @@ -16,11 +18,16 @@ fun AccountProfileV2(id: String){ val navController = LocalNavController.current LaunchedEffect(Unit) { model.loadProfile(id) + MyProfileViewModel.loadProfile() + } + var isSelf = false + if (id == MyProfileViewModel.profile?.id.toString()) { + isSelf = true } ProfileV3( sharedFlow = model.momentsFlow, profile = model.profile, - isSelf = false, + isSelf = isSelf, onChatClick = { model.profile?.let { navController.navigateToChat(it.id.toString())