Skip to content
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

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

Rawa
Copy link
Contributor

@Rawa Rawa commented Sep 11, 2023

Add the copy icon to make it clean that the user can copy the account number.


This change is Reviewable

@linear
Copy link

linear bot commented Sep 11, 2023

@Rawa Rawa force-pushed the add-copy-icon-button-account-created-screen-droid-316 branch from c2b2781 to 77a701c Compare September 11, 2023 08:30
@Rawa Rawa requested review from Pururun and albin-mullvad and removed request for Pururun September 11, 2023 08:39
@Rawa Rawa force-pushed the add-copy-icon-button-account-created-screen-droid-316 branch from 77a701c to b257471 Compare September 11, 2023 08:54
Copy link
Contributor Author

@Rawa Rawa left a 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.

@Rawa Rawa added the Android Issues related to Android label Sep 11, 2023
@Rawa Rawa self-assigned this Sep 11, 2023
@Rawa Rawa force-pushed the add-copy-icon-button-account-created-screen-droid-316 branch 2 times, most recently from 0eccf58 to d7041c1 Compare September 11, 2023 09:12
Copy link
Contributor

@Pururun Pururun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

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

Copy link
Collaborator

@albin-mullvad albin-mullvad left a 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

Copy link
Contributor Author

@Rawa Rawa left a 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!

@Rawa Rawa force-pushed the add-copy-icon-button-account-created-screen-droid-316 branch from bcf5061 to b2718d2 Compare September 27, 2023 07:42
Copy link
Contributor

@Pururun Pururun left a 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: :shipit: complete! all files reviewed, all discussions resolved

@Rawa Rawa force-pushed the add-copy-icon-button-account-created-screen-droid-316 branch 2 times, most recently from 32c9b6b to e22bdd7 Compare September 27, 2023 08:25
Copy link
Collaborator

@albin-mullvad albin-mullvad left a 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)

Copy link
Contributor

@Pururun Pururun left a 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: :shipit: complete! all files reviewed, all discussions resolved

@Pururun Pururun force-pushed the add-copy-icon-button-account-created-screen-droid-316 branch from e22bdd7 to d6adb5a Compare September 27, 2023 11:44
@Pururun Pururun merged commit 6541297 into main Sep 27, 2023
9 checks passed
@Pururun Pururun deleted the add-copy-icon-button-account-created-screen-droid-316 branch September 27, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issues related to Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants