修复搜索页面,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)
}
Spacer(modifier = Modifier.padding(16.dp))
// Spacer(modifier = Modifier.padding(16.dp))
}
}
}
@@ -333,33 +333,31 @@ fun UserItem(
)
}
Spacer(modifier = Modifier.width(16.dp))
Box(
modifier = Modifier
) {
if (accountProfile.id != AppState.UserId) {
if (accountProfile.isFollowing) {
ActionButton(
text = stringResource(R.string.following_upper),
backgroundColor = Color(0xFF9E9E9E),
contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp),
color = Color.White,
fullWidth = false
) {
onFollow(accountProfile)
}
} else {
ActionButton(
text = stringResource(R.string.follow_upper),
backgroundColor = Color(0xffda3832),
contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp),
color = Color.White,
fullWidth = false
) {
onFollow(accountProfile)
}
}
}
}
// Box {
// if (accountProfile.id != AppState.UserId) {
// if (accountProfile.isFollowing) {
// ActionButton(
// text = stringResource(R.string.following_upper),
// backgroundColor = Color(0xFF9E9E9E),
// contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp),
// color = Color.White,
// fullWidth = false
// ) {
// onFollow(accountProfile)
// }
// } else {
// ActionButton(
// text = stringResource(R.string.follow_upper),
// backgroundColor = Color(0xffda3832),
// contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp),
// color = Color.White,
// fullWidth = false
// ) {
// onFollow(accountProfile)
// }
// }
// }
// }
}
}
}

View File

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