From 349d39daf2c09217f1beee736a32e3cd0c8a4f1f Mon Sep 17 00:00:00 2001 From: zhong <2724770085@qq.com> Date: Fri, 12 Sep 2025 18:24:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG:=E6=88=91=E7=9A=84?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=8F=B3=E4=B8=8A=E8=A7=92=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E4=BC=9A=E8=B7=9F=E9=9A=8F=E8=83=8C=E6=99=AF=E5=9B=BE=E4=B8=80?= =?UTF-8?q?=E8=B5=B7=E5=90=91=E4=B8=8A=E6=BB=91=E8=B5=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/index/tabs/profile/ProfileV3.kt | 186 ++++++++---------- 1 file changed, 85 insertions(+), 101 deletions(-) diff --git a/app/src/main/java/com/aiosman/ravenow/ui/index/tabs/profile/ProfileV3.kt b/app/src/main/java/com/aiosman/ravenow/ui/index/tabs/profile/ProfileV3.kt index 5202153..20313b4 100644 --- a/app/src/main/java/com/aiosman/ravenow/ui/index/tabs/profile/ProfileV3.kt +++ b/app/src/main/java/com/aiosman/ravenow/ui/index/tabs/profile/ProfileV3.kt @@ -50,10 +50,12 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.drawWithContent import androidx.compose.ui.draw.shadow import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.graphics.graphicsLayer +import androidx.compose.ui.graphics.nativeCanvas import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.layout.onGloballyPositioned import androidx.compose.ui.platform.LocalContext @@ -369,39 +371,6 @@ fun ProfileV3( ) } } - if (isSelf&&isMain) { - Box( - modifier = Modifier - .align(Alignment.TopEnd) - .padding( - top = statusBarPaddingValues.calculateTopPadding(), - start = 8.dp, - end = 8.dp - ) - .noRippleClickable { - IndexViewModel.openDrawer = true - } - ) { - Box( - modifier = Modifier - .padding(16.dp) - .clip(RoundedCornerShape(8.dp)) - .background( - AppColors.background.copy( - alpha = 0.7f - ) - ) - - ) { - Icon( - painter = painterResource(id = R.drawable.rider_pro_more_horizon), - contentDescription = "", - - tint = AppColors.text - ) - } - } - } } Box( @@ -460,7 +429,7 @@ fun ProfileV3( } } - + // 添加用户智能体行(智能体用户不显示) if (!isAiAccount) { UserAgentsRow( @@ -509,84 +478,99 @@ fun ProfileV3( } - Column( - modifier = Modifier - .fillMaxWidth() - .graphicsLayer { - alpha = 1 - state.toolbarState.progress - } - .background(AppColors.profileBackground) - .onGloballyPositioned { - miniToolbarHeight = with(density) { - it.size.height.toDp().value.toInt() + Box(modifier = Modifier.fillMaxWidth()) { + Column( + modifier = Modifier + .fillMaxWidth() + .graphicsLayer { + alpha = 1 - state.toolbarState.progress + } + .background(AppColors.profileBackground) + .onGloballyPositioned { + miniToolbarHeight = with(density) { + it.size.height.toDp().value.toInt() + } } - } - ) { - StatusBarSpacer() - Row( - modifier = Modifier.padding( - horizontal = 16.dp, - vertical = 8.dp, - ).noRippleClickable { - - }, - - verticalAlignment = Alignment.CenterVertically ) { - if (!isMain) { - Image( - painter = painterResource(id = R.drawable.rider_pro_back_icon), // Replace with your image resource - contentDescription = "Back", - modifier = Modifier - .noRippleClickable { - navController.navigateUp() - } - .size(24.dp), - colorFilter = ColorFilter.tint(AppColors.text) - ) - Spacer(modifier = Modifier.width(8.dp)) - CustomAsyncImage( - LocalContext.current, - profile?.avatar, - modifier = Modifier - .size(32.dp) - .clip(CircleShape), - contentDescription = "", - contentScale = ContentScale.Crop - ) - Spacer(modifier = Modifier.width(16.dp)) - Text( - text = profile?.nickName ?: "", - fontSize = 16.sp, - fontWeight = FontWeight.W600, - color = AppColors.text - ) + StatusBarSpacer() + Row( + modifier = Modifier.padding( + horizontal = 16.dp, + vertical = 8.dp, + ).noRippleClickable { - } + }, + + verticalAlignment = Alignment.CenterVertically + ) { + if (!isMain) { + Image( + painter = painterResource(id = R.drawable.rider_pro_back_icon), // Replace with your image resource + contentDescription = "Back", + modifier = Modifier + .noRippleClickable { + navController.navigateUp() + } + .size(24.dp), + colorFilter = ColorFilter.tint(AppColors.text) + ) + Spacer(modifier = Modifier.width(8.dp)) + CustomAsyncImage( + LocalContext.current, + profile?.avatar, + modifier = Modifier + .size(32.dp) + .clip(CircleShape), + contentDescription = "", + contentScale = ContentScale.Crop + ) + Spacer(modifier = Modifier.width(16.dp)) + Text( + text = profile?.nickName ?: "", + fontSize = 16.sp, + fontWeight = FontWeight.W600, + color = AppColors.text + ) + + } Spacer(modifier = Modifier.weight(1f)) if (isSelf&&isMain) { Box( - modifier = Modifier.noRippleClickable { - IndexViewModel.openDrawer = true - } - ) { - Box( - modifier = Modifier - .padding(16.dp) + modifier = Modifier + .size(24.dp) + .padding(16.dp) + ) + } + } - ) { - Icon( - painter = painterResource(id = R.drawable.rider_pro_more_horizon), - contentDescription = "", - tint = AppColors.text - ) - } + Spacer(modifier = Modifier.height(8.dp)) + } + if (isSelf&&isMain) { + Box( + modifier = Modifier + .align(Alignment.TopEnd) + .padding( + top = 32.dp , + end = 16.dp + ) + .noRippleClickable { + IndexViewModel.openDrawer = true + } + ) { + Box( + modifier = Modifier + .padding(16.dp) - } + ) { + Icon( + painter = painterResource(id = R.drawable.rider_pro_more_horizon), + contentDescription = "", + tint = AppColors.text + ) } + } } - Spacer(modifier = Modifier.height(8.dp)) } } ) {