From aadb4e38b2729b550b2dbd66a9b011a8b81865ad Mon Sep 17 00:00:00 2001 From: xtaodada Date: Fri, 16 Aug 2024 19:34:26 +0800 Subject: [PATCH] fix: copy device token --- app/src/main/java/hat/holo/token/TokenActivity.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/hat/holo/token/TokenActivity.kt b/app/src/main/java/hat/holo/token/TokenActivity.kt index 569670b..4403901 100644 --- a/app/src/main/java/hat/holo/token/TokenActivity.kt +++ b/app/src/main/java/hat/holo/token/TokenActivity.kt @@ -79,7 +79,7 @@ private fun TokenActivity.Content(deviceInfo: DeviceInfo, accountInfo: AccountIn Column( modifier = Modifier.padding(15.dp) ) { - var grantSToken by remember { mutableStateOf(false) } + var grantSToken by remember { mutableStateOf(true) } var showDoneIcon by remember { mutableStateOf(false) } CustomCheckBox( checked = true, @@ -100,8 +100,8 @@ private fun TokenActivity.Content(deviceInfo: DeviceInfo, accountInfo: AccountIn } // TODO: More description ) CustomCheckBox( - checked = grantSToken, - onCheckedChange = { v -> grantSToken = v }, + checked = true, + onCheckedChange = {}, name = "SToken", permissions = buildAnnotatedString { appendLine("此令牌可以用于:") @@ -126,8 +126,8 @@ private fun TokenActivity.Content(deviceInfo: DeviceInfo, accountInfo: AccountIn put("mid", accountInfo.mid) put("stoken", accountInfo.sToken) } - put("device_id", deviceInfo.id) - put("device_fp", deviceInfo.fingerprint) + put("x-rpc-device_id", deviceInfo.id) + put("x-rpc-device_fp", deviceInfo.fingerprint) }.map { (k, v) -> "$k=$v" }.joinToString(";") val clip = ClipData.newPlainText(null, authStr) getSystemService()!!.setPrimaryClip(clip)