Skip to content
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
25 changes: 16 additions & 9 deletions src/Core/src/Platform/iOS/MauiRefreshView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,23 @@ public bool IsRefreshing

if (_isRefreshing != _refreshControl.Refreshing)
{
if (_isRefreshing)
// iOS 26+ quirk: without dispatching to the main queue, the UIRefreshControl
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

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

The comment mentions "iOS 26+" which is incorrect - iOS version numbers have never reached 26. The current latest version is iOS 18. This should be corrected to reference the actual iOS versions where this issue occurs, or simply state "iOS" without a specific version number if it affects all versions.

Suggested change
// iOS 26+ quirk: without dispatching to the main queue, the UIRefreshControl
// iOS quirk: without dispatching to the main queue, the UIRefreshControl

Copilot uses AI. Check for mistakes.
// indicator may not appear. Scheduling BeginRefreshing/EndRefreshing on the
// next runloop tick ensures the control has been inserted and laid out
// before we toggle its refreshing state.
DispatchQueue.MainQueue.DispatchAsync(() =>
{
TryOffsetRefresh(this, IsRefreshing);
_refreshControl.BeginRefreshing();
}
else
{
_refreshControl.EndRefreshing();
TryOffsetRefresh(this, IsRefreshing);
}
if (_isRefreshing)
{
TryOffsetRefresh(this, IsRefreshing);
_refreshControl.BeginRefreshing();
}
else
{
_refreshControl.EndRefreshing();
TryOffsetRefresh(this, IsRefreshing);
}
});
}
}
}
Expand Down