feat: 复制 UID

This commit is contained in:
HuanCheng65 2023-10-08 01:07:24 +08:00
parent dabbe40331
commit 7677e4d65c
No known key found for this signature in database
GPG Key ID: 5EC9DD60A32C7360
1 changed files with 10 additions and 1 deletions

View File

@ -93,6 +93,7 @@ import com.huanchengfly.tieba.post.ui.widgets.compose.states.StateScreen
import com.huanchengfly.tieba.post.utils.AccountUtil.LocalAccount
import com.huanchengfly.tieba.post.utils.StringUtil
import com.huanchengfly.tieba.post.utils.StringUtil.getShortNumString
import com.huanchengfly.tieba.post.utils.TiebaUtil
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import kotlinx.collections.immutable.ImmutableList
@ -350,6 +351,12 @@ fun UserProfilePage(
)
)
}
},
onCopyIdClick = {
TiebaUtil.copyText(
context,
holder.get { id }.toString()
)
}
)
}
@ -473,6 +480,7 @@ private fun UserProfileDetail(
showBtn: Boolean = true,
isSelf: Boolean = false,
onBtnClick: () -> Unit = {},
onCopyIdClick: () -> Unit = {},
) {
Column(
modifier = modifier,
@ -611,7 +619,8 @@ private fun UserProfileDetail(
imageVector = Icons.Outlined.ContentCopy,
contentDescription = null
)
}
},
onClick = onCopyIdClick
)
if (user.get { ip_address }.isNotEmpty()) {
Chip(