我的智能体
This commit is contained in:
@@ -85,7 +85,9 @@ import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
||||
import kotlinx.coroutines.launch
|
||||
import java.io.File
|
||||
|
||||
|
||||
/**
|
||||
* 发布动态
|
||||
*/
|
||||
@Preview
|
||||
@Composable
|
||||
fun NewPostScreen() {
|
||||
|
||||
@@ -123,6 +123,9 @@ import kotlinx.coroutines.launch
|
||||
import net.engawapg.lib.zoomable.rememberZoomState
|
||||
import net.engawapg.lib.zoomable.zoomable
|
||||
|
||||
/**
|
||||
* 动态详情
|
||||
*/
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun PostScreen(
|
||||
@@ -689,6 +692,7 @@ fun Header(
|
||||
windowInsets = WindowInsets(0)
|
||||
) {
|
||||
PostMenuModal(
|
||||
|
||||
onDeleteClick = {
|
||||
onDeleteClick()
|
||||
expanded = false
|
||||
@@ -696,7 +700,8 @@ fun Header(
|
||||
onReportClick = {
|
||||
onReportClick()
|
||||
expanded = false
|
||||
}
|
||||
},
|
||||
userId = userId
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1214,7 +1219,7 @@ fun CommentItem(
|
||||
color = AppColors.nonActiveText,
|
||||
)
|
||||
Spacer(modifier = Modifier.width(27.dp))
|
||||
if (AppState.UserId?.toLong() != commentEntity.author) {
|
||||
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.rider_pro_comment),
|
||||
contentDescription = "",
|
||||
@@ -1236,7 +1241,7 @@ fun CommentItem(
|
||||
)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1375,11 +1380,11 @@ fun PostBottomBar(
|
||||
fun PostMenuModal(
|
||||
onDeleteClick: () -> Unit = {},
|
||||
onReportClick: () -> Unit = {},
|
||||
momentEntity: MomentEntity? = null
|
||||
userId: Int? = 0
|
||||
) {
|
||||
val AppColors = LocalAppTheme.current
|
||||
|
||||
Column(
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(160.dp)
|
||||
@@ -1388,10 +1393,10 @@ fun PostMenuModal(
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth(),
|
||||
.size(60.dp),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
momentEntity?.let {
|
||||
if(AppState.UserId == userId){
|
||||
Column(
|
||||
modifier = Modifier.padding(end = 16.dp),
|
||||
verticalArrangement = Arrangement.Center,
|
||||
@@ -1417,44 +1422,52 @@ fun PostMenuModal(
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.delete),
|
||||
fontSize = 11.sp,
|
||||
fontSize = 12.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Column(
|
||||
modifier = Modifier.padding(end = 16.dp),
|
||||
verticalArrangement = Arrangement.Center,
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.size(60.dp),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.clip(CircleShape)
|
||||
.noRippleClickable {
|
||||
onReportClick()
|
||||
if(AppState.UserId == userId){
|
||||
Column(
|
||||
modifier = Modifier.padding(end = 16.dp),
|
||||
verticalArrangement = Arrangement.Center,
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.clip(CircleShape)
|
||||
.noRippleClickable {
|
||||
onReportClick()
|
||||
}
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.rider_pro_moment_report),
|
||||
contentDescription = "",
|
||||
modifier = Modifier.size(24.dp),
|
||||
colorFilter = ColorFilter.tint(
|
||||
AppColors.error
|
||||
)
|
||||
)
|
||||
}
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.rider_pro_moment_delete),
|
||||
contentDescription = "",
|
||||
modifier = Modifier.size(24.dp),
|
||||
colorFilter = ColorFilter.tint(
|
||||
AppColors.text
|
||||
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.report),
|
||||
fontSize = 12.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = AppColors.error
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.report),
|
||||
fontSize = 11.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
color = AppColors.text
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1621,7 +1634,7 @@ fun CommentMenuModal(
|
||||
onCloseClick()
|
||||
}
|
||||
}
|
||||
if (!isSelf) {
|
||||
//自己也可以回复自己
|
||||
Spacer(modifier = Modifier.width(48.dp))
|
||||
MenuActionItem(
|
||||
icon = R.drawable.rider_pro_comment,
|
||||
@@ -1629,7 +1642,7 @@ fun CommentMenuModal(
|
||||
) {
|
||||
onReplyClick()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Spacer(modifier = Modifier.height(48.dp))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user