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 For Maui WinUI Registrations #3577
Conversation
@@ -28,12 +33,15 @@ public class ActivationForViewFetcher : IActivationForViewFetcher | |||
/// <inheritdoc/> | |||
public int GetAffinityForView(Type view) => | |||
#if HAS_WINUI | |||
#if IS_MAUI |
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.
Should IS_MAUI be nested in the HAS_WINUI here?
|
||
#if HAS_MAUI | ||
#if HAS_MAUI || (HAS_WINUI && IS_MAUI) |
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.
What's the difference between HAS_MAUI and IS_MAUI? Should we rename these?
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.
These are to distinguish the Maui Android / iOS section (HAS_MAUI) and the Maui WinUI section HAS_WinUI, as we are using a single file between the two projects (Maui and WinUI) the namespaces need to match the assembly hence the IS_MAUI and IS_WINUI relates to the Project SDK values of UseMaui and UseWinUI.
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.
Is there a way for us to have more meaningful name for one of them. Don't mind a bit of verbosity.
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.
I can look at dropping HAS_MAUI and invert HAS_WINUI where required, perhaps make HAS_WINUI => WINUI_TARGET
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.
Yeah seems nicer name.
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #3577 +/- ##
==========================================
- Coverage 64.09% 64.07% -0.02%
==========================================
Files 157 157
Lines 5762 5762
==========================================
- Hits 3693 3692 -1
- Misses 2069 2070 +1 ☔ View full report in Codecov by Sentry. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fix for #3576
What kind of change does this PR introduce?
Fix for #3576
What is the current behaviour?
ActivationForViewFetcher is not registered
What is the new behaviour?
Maui and WinUI Registrations are now Registered
Namespace issue resolved
What might this PR break?
None
Please check if the PR fulfils these requirements
Other information: