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

Refactor RemoteArgumentSource to be a sealed class #487

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

gnawf
Copy link
Collaborator

@gnawf gnawf commented Dec 13, 2023

No description provided.

@gnawf gnawf force-pushed the remove-hydration-validation-side-effects branch from 27d9586 to 10615f0 Compare December 14, 2023 03:37
@gnawf gnawf force-pushed the refactor-remote-arg-source branch 2 times, most recently from 93d1f97 to 411bce9 Compare December 19, 2023 22:22
@gnawf gnawf changed the base branch from remove-hydration-validation-side-effects to master December 19, 2023 22:22
@gnawf gnawf force-pushed the refactor-remote-arg-source branch 2 times, most recently from b540b12 to b83b694 Compare December 19, 2023 22:50
@gnawf gnawf marked this pull request as ready for review December 19, 2023 22:51
@gnawf gnawf marked this pull request as draft December 19, 2023 23:17
@gnawf gnawf force-pushed the refactor-remote-arg-source branch from b83b694 to f996a34 Compare December 19, 2023 23:18
@gnawf gnawf changed the base branch from master to fix-field-source-edge-case December 19, 2023 23:18
@gnawf gnawf changed the base branch from fix-field-source-edge-case to fix-source-field-validation December 19, 2023 23:18
@gnawf gnawf force-pushed the refactor-remote-arg-source branch from f996a34 to a3f9831 Compare December 21, 2023 02:31
@gnawf gnawf changed the base branch from fix-source-field-validation to master December 21, 2023 02:31
@gnawf gnawf force-pushed the refactor-remote-arg-source branch 2 times, most recently from 8eba428 to cfa1604 Compare December 21, 2023 02:37
@gnawf gnawf marked this pull request as ready for review December 21, 2023 02:40
pathToField = values.subList(1, values.size),
staticValue = null,
sourceType = SourceType.ObjectField,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No need to fill in the other values because we create just RemoteArgumentSource.ObjectField now.

}

RemoteArgumentDefinition(remoteArgName, remoteArgumentSource)
}
}

private fun createTemplatedRemoteArgumentSource(value: String, argumentType: SourceType): RemoteArgumentSource {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Inlined this function, it's much simpler now with the sealed classes.

@gnawf gnawf requested a review from sbarker2 January 16, 2024 23:11
@sbarker2
Copy link
Collaborator

This looks good, will re-review after you've resolved the conflicts

sbarker2
sbarker2 previously approved these changes Jan 22, 2024
@gnawf gnawf force-pushed the refactor-remote-arg-source branch from cfa1604 to 3fc306f Compare January 22, 2024 22:20
@gnawf gnawf requested a review from sbarker2 January 22, 2024 22:21
@gnawf gnawf merged commit 6500c13 into master Jan 22, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants