fix(rust): say when and where an account was linked, as the website's row does
Some checks failed
PR Checks / android-build (pull_request) Failing after 22m6s
Some checks failed
PR Checks / android-build (pull_request) Failing after 22m6s
Found by the emulator walk, not by the suite: the app's row carried the name and the Steam id and stopped there, while the website's says "linked just now on rust-oxide". Neither fact is part of the identity — a link is fleet-wide — but which server minted the code is where a support conversation starts, and the module's own schema comment says so. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PMH6bw1jXMgbyF3ZWGEzSM
This commit is contained in:
@@ -188,6 +188,23 @@ private fun LinkRow(link: RustLinkDto, busy: Boolean, onUnlink: () -> Unit) {
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
|
||||
// When, and which server minted the code. Not part of the
|
||||
// identity — a link is fleet-wide — but it is where a support
|
||||
// conversation starts, and the website's own row says it.
|
||||
val when_ = rustAgo(link.linkedAt)
|
||||
val where = link.serverId?.takeIf { it.isNotBlank() }
|
||||
|
||||
if (when_ != null || where != null) {
|
||||
Text(
|
||||
text = listOfNotNull(
|
||||
when_?.let { stringResource(R.string.rust_account_linked_when, it) },
|
||||
where,
|
||||
).joinToString(" · "),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
TextButton(onClick = onUnlink, enabled = !busy) {
|
||||
|
||||
@@ -621,6 +621,7 @@
|
||||
<string name="rust_link_error">Could not link that code.</string>
|
||||
<string name="rust_unlink_action">Unlink</string>
|
||||
<string name="rust_unlink_error">Could not unlink that account.</string>
|
||||
<string name="rust_account_linked_when">linked %1$s</string>
|
||||
<string name="rust_account_none">No Steam account is linked to this profile yet.</string>
|
||||
<string name="rust_account_fleet_note">A link covers every server this community runs — a Steam account is one person wherever they play. You can also type /unlink in game.</string>
|
||||
<string name="rust_held_title">What you can do in game</string>
|
||||
|
||||
Reference in New Issue
Block a user