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

Remove by custom DNS by index #6308

Merged

Conversation

Rawa
Copy link
Contributor

@Rawa Rawa commented Jun 3, 2024

Fixes bug where one would remove based on the current text entry instead of the index.


This change is Reviewable

Copy link

linear bot commented Jun 3, 2024

@Rawa Rawa self-assigned this Jun 3, 2024
@Rawa Rawa added the Android Issues related to Android label Jun 3, 2024
@Rawa Rawa force-pushed the dns-remove-is-based-on-input-should-be-based-on-index-droid-1030 branch from 5ee522c to b1c5763 Compare June 3, 2024 08:31
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 5 of 5 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

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.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Rawa)


android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/ManagementService.kt line 351 at r1 (raw file):

                val updatedDnsOptions =
                    DnsOptions.customOptions.addresses.modify(currentDnsOptions) {
                        it.filterIndexed { i, _ -> i != index }

Just a thought, would it be more clear to show what we are doing by doing something like:
it.toMutableList().apply { removeAt(1) } ?

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.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Rawa)


android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/ManagementService.kt line 351 at r1 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

Just a thought, would it be more clear to show what we are doing by doing something like:
it.toMutableList().apply { removeAt(1) } ?

Should be removeAt(index)

@Rawa Rawa force-pushed the dns-remove-is-based-on-input-should-be-based-on-index-droid-1030 branch from b1c5763 to 2001e35 Compare June 3, 2024 09:01
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 5 files reviewed, all discussions resolved (waiting on @Pururun)


android/lib/daemon-grpc/src/main/kotlin/net/mullvad/mullvadvpn/lib/daemon/grpc/ManagementService.kt line 351 at r1 (raw file):

Previously, Pururun (Jonatan Rhodin) wrote…

Should be removeAt(index)

Thanks, clarified.

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 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@Rawa Rawa force-pushed the dns-remove-is-based-on-input-should-be-based-on-index-droid-1030 branch from 2001e35 to f11d057 Compare June 3, 2024 12:55
@Rawa Rawa merged commit 143a6db into main Jun 3, 2024
18 checks passed
@Rawa Rawa deleted the dns-remove-is-based-on-input-should-be-based-on-index-droid-1030 branch June 3, 2024 12:56
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.

2 participants