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

[BREAKING] chore: Make Current BaseActivity nullable #18582

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Uno.UI/BaseActivity.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
/// For more info look at the lifecycle diagram documented here: https://developer.android.com/reference/android/app/Activity.html.
/// </remarks>
/// </summary>
public static BaseActivity Current => _current;
#nullable enable
public static BaseActivity? Current => _current;

Check warning on line 86 in src/Uno.UI/BaseActivity.Android.cs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Uno.UI/BaseActivity.Android.cs#L86

Change either the name of property 'Current' or the name of method 'GetCurrent' to make them distinguishable.
Copy link
Member

Choose a reason for hiding this comment

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

This will be a breaking change, we can do that, but in a future major.

#nullable disable

/// <summary>
/// Gets the first BaseActivity which is set as current. Unlike the <see cref="Current"/>, this method will wait until a BaseActivity is set as Current.
Expand Down
Loading