修复个人主页跳转
This commit is contained in:
@@ -86,7 +86,7 @@ fun NotificationsScreen() {
|
|||||||
) {
|
) {
|
||||||
NotificationIndicator(
|
NotificationIndicator(
|
||||||
MessageListViewModel.likeNoticeCount,
|
MessageListViewModel.likeNoticeCount,
|
||||||
R.drawable.rider_pro_like,
|
R.drawable.rider_pro_moment_like,
|
||||||
stringResource(R.string.like_upper)
|
stringResource(R.string.like_upper)
|
||||||
) {
|
) {
|
||||||
if (MessageListViewModel.likeNoticeCount > 0) {
|
if (MessageListViewModel.likeNoticeCount > 0) {
|
||||||
|
|||||||
@@ -22,6 +22,6 @@ fun ProfileWrap(
|
|||||||
MyProfileViewModel.logout(context)
|
MyProfileViewModel.logout(context)
|
||||||
},
|
},
|
||||||
profile = MyProfileViewModel.profile,
|
profile = MyProfileViewModel.profile,
|
||||||
sharedFlow = MyProfileViewModel.sharedFlow
|
sharedFlow = MyProfileViewModel.sharedFlow,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -120,12 +120,19 @@ fun UserItem(accountProfileEntity: AccountProfileEntity) {
|
|||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
// 个人简介
|
// 个人简介
|
||||||
|
if (accountProfileEntity.bio.isNotEmpty()){
|
||||||
Text(
|
Text(
|
||||||
text = accountProfileEntity.bio,
|
text = accountProfileEntity.bio,
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
color = Color.Gray
|
color = Color.Gray
|
||||||
)
|
)
|
||||||
|
}else{
|
||||||
|
Text(
|
||||||
|
text = "No bio here.",
|
||||||
|
fontSize = 14.sp,
|
||||||
|
color = Color.Gray
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
package com.aiosman.riderpro.ui.profile
|
package com.aiosman.riderpro.ui.profile
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import com.aiosman.riderpro.LocalNavController
|
import com.aiosman.riderpro.LocalNavController
|
||||||
import com.aiosman.riderpro.exp.viewModelFactory
|
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.index.tabs.profile.ProfileV3
|
||||||
import com.aiosman.riderpro.ui.navigateToChat
|
import com.aiosman.riderpro.ui.navigateToChat
|
||||||
|
|
||||||
@@ -16,11 +18,16 @@ fun AccountProfileV2(id: String){
|
|||||||
val navController = LocalNavController.current
|
val navController = LocalNavController.current
|
||||||
LaunchedEffect(Unit) {
|
LaunchedEffect(Unit) {
|
||||||
model.loadProfile(id)
|
model.loadProfile(id)
|
||||||
|
MyProfileViewModel.loadProfile()
|
||||||
|
}
|
||||||
|
var isSelf = false
|
||||||
|
if (id == MyProfileViewModel.profile?.id.toString()) {
|
||||||
|
isSelf = true
|
||||||
}
|
}
|
||||||
ProfileV3(
|
ProfileV3(
|
||||||
sharedFlow = model.momentsFlow,
|
sharedFlow = model.momentsFlow,
|
||||||
profile = model.profile,
|
profile = model.profile,
|
||||||
isSelf = false,
|
isSelf = isSelf,
|
||||||
onChatClick = {
|
onChatClick = {
|
||||||
model.profile?.let {
|
model.profile?.let {
|
||||||
navController.navigateToChat(it.id.toString())
|
navController.navigateToChat(it.id.toString())
|
||||||
|
|||||||
Reference in New Issue
Block a user