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

Fix: Restore case-insensitive WireUpControls feature #2080

Merged
merged 8 commits into from Jun 18, 2019

Conversation

Projects
None yet
2 participants
@cabauman
Copy link
Contributor

commented Jun 18, 2019

What kind of change does this PR introduce?

Fixes #2061

What is the current behavior?

Not wiring up controls that are camel cased in the axml, but are upper cased in the class. If the axml is changed to match the class, it wires up.

What is the new behavior?

Wiring up controls won't depend on property case.

What might this PR break?
Anyone calling the View overload of GetControl because the signature changed.
Anyone calling the Fragment overload of GetControl because it was removed.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

cabauman added some commits Jun 16, 2019

Update ControlFetcherMixin
- Reintroduce the controlIds dictionary to allow for case-insensitive resource IDs.
- Map assesmbly to dictionary of resource IDs and load the assembly lazily, as needed.
- Replace generic GetControl extensions with non-generic versions (gets rid of multiple casts).
- Get rid of the reflection method members.
- Add conditional for support fragment via the RXUI_ANDROID_SUPPORT constant.
Restore case-insensitive WireUpControls feature
- Lazily determine assembly of the type making the call to WireUpControls.
- Use a ConcurrentDictionary to map assembly to the controlIds dictionary.
- Get rid of unneeded GetControl Fragment overload.
Re-add AndroidSupport ControlFetcherMixin
Only the support fragment overload is needed because we're sharing the base code.

@cabauman cabauman requested a review from reactiveui/android-team as a code owner Jun 18, 2019

{
private static readonly ConditionalWeakTable<object, Dictionary<string, View>> viewCache =
new ConditionalWeakTable<object, Dictionary<string, View>>();

static ControlFetcherMixin()

This comment has been minimized.

Copy link
@glennawatson

glennawatson Jun 18, 2019

Contributor

Do we need the empty constructor?

This comment has been minimized.

Copy link
@cabauman

cabauman Jun 18, 2019

Author Contributor

No, I can remove it.

@glennawatson glennawatson merged commit 59da6e6 into reactiveui:master Jun 18, 2019

4 checks passed

ReactiveUI-CI Build #9.17.11+975eb975b3 succeeded
Details
ReactiveUI-CI (Mac) Mac succeeded
Details
ReactiveUI-CI (Windows) Windows succeeded
Details
license/cla All CLA requirements met.
Details

madmonkey added a commit to madmonkey/ReactiveUI that referenced this pull request Jul 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.