-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add copy icon button account created screen #5141
Add copy icon button account created screen #5141
Conversation
DROID-316 Add copy icon button Account Created screen
Following screen should have a copy icon next to the account number. https://app.zeplin.io/project/5f928a32fdc9962af9018d70/screen/609427603e45189c24fe66e2 |
c2b2781
to
77a701c
Compare
77a701c
to
b257471
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/CopyableObfuscationView.kt
line 61 at r2 (raw file):
val copy = {
context.copyToClipboard(
content = content,
clipboardLabel = context.getString(R.string.mullvad_account_number)
)
SdkUtils.showCopyToastIfNeeded(
context,
context.getString(R.string.copied_mullvad_account_number)
)
}
This lambda should be replaced with the compose style of doing it long-term (LocalClipboardManager
& SnackbarHostState
for toast). However, I avoided doing this due to the third-party library used for Collapsible App Bar does not support Snackbar
.
0eccf58
to
d7041c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 5 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Rawa)
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/CopyableObfuscationView.kt
line 32 at r3 (raw file):
@Composable fun CopyableObfuscationView(content: String) { var shouldObfuscated by remember { mutableStateOf(true) }
I'm aware that this var
named was already used before this PR, but would be nice to improve/clarfiy it
Code quote:
shouldObfuscated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 4 of 6 files reviewed, all discussions resolved (waiting on @Pururun)
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/CopyableObfuscationView.kt
line 32 at r3 (raw file):
Previously, albin-mullvad wrote…
I'm aware that this
var
named was already used before this PR, but would be nice to improve/clarfiy it
Fixed!
bcf5061
to
b2718d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r4, 2 of 2 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
32c9b6b
to
e22bdd7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, 2 of 2 files at r4, all commit messages.
Reviewable status: 5 of 6 files reviewed, all discussions resolved (waiting on @Pururun)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
e22bdd7
to
d6adb5a
Compare
Add the copy icon to make it clean that the user can copy the account number.
This change is