Skip to content

Commit

Permalink
fix: copy device token
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Aug 16, 2024
1 parent 5050b29 commit aadb4e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/main/java/hat/holo/token/TokenActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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("此令牌可以用于:")
Expand All @@ -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<ClipboardManager>()!!.setPrimaryClip(clip)
Expand Down

0 comments on commit aadb4e3

Please sign in to comment.