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 missing iOS navigation events and removes duplicate page (dis)appearing events #4006

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
11 changes: 10 additions & 1 deletion src/Sentry.Maui/Internal/MauiEventsBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,16 @@ public void HandleApplicationEvents(Application application, bool bind = true)
{
if (bind)
{
// Attach element events to all descendents as they are added to the application.
// Attach element events to all existing descendants.
foreach (var descendant in application.GetVisualTreeDescendants().Skip(1))
{
if (descendant is VisualElement element)
{
OnApplicationOnDescendantAdded(application, new ElementEventArgs(element));
}
}

// Attach element events to all descendants as they are added to the application.
application.DescendantAdded += OnApplicationOnDescendantAdded;
application.DescendantRemoved += OnApplicationOnDescendantRemoved;

Expand Down