修复搜索页面,Moment页面的边距和Users页面的操作按钮

This commit is contained in:
2024-10-13 03:02:33 +08:00
parent f6e763cb3f
commit 341b092687
2 changed files with 36 additions and 38 deletions

View File

@@ -259,7 +259,7 @@ fun MomentResultTab() {
) { ) {
MomentCard(momentEntity = momentItem, hideAction = true) MomentCard(momentEntity = momentItem, hideAction = true)
} }
Spacer(modifier = Modifier.padding(16.dp)) // Spacer(modifier = Modifier.padding(16.dp))
} }
} }
} }
@@ -333,33 +333,31 @@ fun UserItem(
) )
} }
Spacer(modifier = Modifier.width(16.dp)) Spacer(modifier = Modifier.width(16.dp))
Box( // Box {
modifier = Modifier // if (accountProfile.id != AppState.UserId) {
) { // if (accountProfile.isFollowing) {
if (accountProfile.id != AppState.UserId) { // ActionButton(
if (accountProfile.isFollowing) { // text = stringResource(R.string.following_upper),
ActionButton( // backgroundColor = Color(0xFF9E9E9E),
text = stringResource(R.string.following_upper), // contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp),
backgroundColor = Color(0xFF9E9E9E), // color = Color.White,
contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp), // fullWidth = false
color = Color.White, // ) {
fullWidth = false // onFollow(accountProfile)
) { // }
onFollow(accountProfile) // } else {
} // ActionButton(
} else { // text = stringResource(R.string.follow_upper),
ActionButton( // backgroundColor = Color(0xffda3832),
text = stringResource(R.string.follow_upper), // contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp),
backgroundColor = Color(0xffda3832), // color = Color.White,
contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp), // fullWidth = false
color = Color.White, // ) {
fullWidth = false // onFollow(accountProfile)
) { // }
onFollow(accountProfile) // }
} // }
} // }
}
}
} }
} }
} }

View File

@@ -688,16 +688,16 @@ fun Header(
Spacer(modifier = Modifier.width(8.dp)) Spacer(modifier = Modifier.width(8.dp))
Text(text = nickname ?: "", fontWeight = FontWeight.Bold) Text(text = nickname ?: "", fontWeight = FontWeight.Bold)
if (AppState.UserId != userId) { // if (AppState.UserId != userId) {
FollowButton( // FollowButton(
isFollowing = isFollowing, // isFollowing = isFollowing,
onFollowClick = onFollowClick, // onFollowClick = onFollowClick,
imageModifier = Modifier // imageModifier = Modifier
.height(18.dp) // .height(18.dp)
.width(80.dp), // .width(80.dp),
fontSize = 12.sp // fontSize = 12.sp
) // )
} // }
if (AppState.UserId == userId) { if (AppState.UserId == userId) {
Spacer(modifier = Modifier.weight(1f)) Spacer(modifier = Modifier.weight(1f))
Box { Box {