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

Ported pending fixes from Xamarin.Forms #5510

Merged
merged 5 commits into from
Mar 26, 2022
Merged

Conversation

jsuarezruiz
Copy link
Contributor


// reuse cell
// Reuse cell
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix ListView grouping not working on Windows
xamarin/Xamarin.Forms#14653

platformView.ScaleX = (float)(view.Scale * view.ScaleX);
var scale = view.Scale;

if (double.IsNaN(scale))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix crash animating several times in a rowtimes Frame scale
xamarin/Xamarin.Forms#14606

@@ -606,7 +606,7 @@ internal override void OnIsPlatformEnabledChanged()

void OnCommandCanExecuteChanged(object sender, EventArgs eventArgs)
{
RefreshAllowed = RefreshCommand.CanExecute(null);
RefreshAllowed = RefreshCommand != null && RefreshCommand.CanExecute(null);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix NRE in ListView Command
xamarin/Xamarin.Forms#14580

var x = (float)layout.DrawBounds.X * -1;

ds.DrawTextLayout(layout, x, 1f, iconcolor);
ds.DrawTextLayout(layout, 1f, 1f, iconcolor);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix FontIcons alignment
xamarin/Xamarin.Forms#15047

@@ -185,7 +185,10 @@ protected override void Dispose(bool disposing)
_currentMenuItems?.Clear();
_currentToolbarItems?.Clear();

_drawerLayout.RemoveDrawerListener(_drawerToggle);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix content pages not Garbage collected
xamarin/Xamarin.Forms#14717

@@ -612,6 +612,10 @@ void OnDataChanged()
// we need to reset the ListView's adapter to reflect the changes on page B
// If there header and footer are present at the reset time of the adapter
// they will be DOUBLE added to the ViewGround (the ListView) causing indexes to be off by one.

if (_realListView.IsDisposed())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Avoid reset ListView adapter in TabbedPage if is already disposed
xamarin/Xamarin.Forms#14635

@@ -19,7 +19,7 @@ public abstract class ItemsViewController<TItemsView> : UICollectionViewControll
public TItemsView ItemsView { get; }
protected ItemsViewLayout ItemsViewLayout { get; set; }
bool _initialized;
bool _isEmpty;
bool _isEmpty = true;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prevent CollectionView.EmptyView from showing up while it shouldn't on iOS
xamarin/Xamarin.Forms#15122

bool isRtl;

if (PlatformVersion.IsAtLeast(10))
isRtl = CollectionView.EffectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirection.RightToLeft;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix CollectionView crash in iOS < 10
xamarin/Xamarin.Forms#14925

@@ -46,6 +46,7 @@ internal void Recycle()
RemoveView(platformView);
}

Content?.Dispose();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix CollectionView item renderer disposal on Android (Memory Leak)
xamarin/Xamarin.Forms#14882

var isEnabled = Element.IsPullToRefreshEnabled && (Element as IListViewController).RefreshAllowed;
_refresh.Post(() =>
{
// NOTE: only disable while NOT refreshing, otherwise Command bindings CanExecute behavior will effectively
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Avoid that disabling ListView RefreshAllowed cancels refresh indicator on Android
xamarin/Xamarin.Forms#14816

@@ -52,9 +53,9 @@ public void AddFrameData(int index, CGImageSource imageSource)
using (var delayTimeValue = gifImageProperties?.ValueForKey(ImageIO.CGImageProperties.GIFDelayTime))
{
if (unclampedDelayTimeValue != null)
double.TryParse(unclampedDelayTimeValue.ToString(), out delayTime);
double.TryParse(unclampedDelayTimeValue.ToString(), NumberStyles.Any, CultureInfo.InvariantCulture, out delayTime);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix issue with gifs and differents DefaultThreadCurrentCulture on iOS
xamarin/Xamarin.Forms#14698

@@ -274,6 +274,9 @@ protected override void OnElementChanged(ElementChangedEventArgs<ListView> e)
}
_tableViewController = new FormsUITableViewController(e.NewElement, _usingLargeTitles);
SetNativeControl(_tableViewController.TableView);

if (Forms.IsiOS15OrNewer)
_tableViewController.TableView.SectionHeaderTopPadding = new nfloat(0);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix issue with ListView wrong top padding in iOS 15
xamarin/Xamarin.Forms#14671

@@ -172,6 +172,8 @@ void SetRenderer(IPlatformViewHandler renderer)

InitializeContentConstraints(platformView);

UpdateVisualStates();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix CollectionView not applying "Selected" VisualState to pre-selected items on iOS
https://github.com/xamarin/Xamarin.Forms/pull/14672/files

@rmarinho
Copy link
Member

Don-t we need to port the fixes to the handlers also? For example ItemsViewController

@Redth Redth requested a review from PureWeen March 24, 2022 17:10
@Redth Redth changed the title [Housekeeping] Ported pending fixes from Xamarin.Forms Ported pending fixes from Xamarin.Forms Mar 24, 2022
@Redth Redth requested a review from rmarinho March 24, 2022 17:22
wasGroupHeader = oldCell.GetIsGroupHeader<ItemsView<Cell>, Cell>();
}

Cell oldCell = Cell;
Copy link
Member

Choose a reason for hiding this comment

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

@jsuarezruiz
Copy link
Contributor Author

Don-t we need to port the fixes to the handlers also? For example ItemsViewController

Sure thing, there are also changes in src/Controls/src/Core/Handlers/Items/iOS/ItemsViewController.cs

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@PureWeen PureWeen added this to the 6.0.300-rc.1 milestone Mar 25, 2022
@PureWeen PureWeen merged commit 41bb8c9 into main Mar 26, 2022
@PureWeen PureWeen deleted the pending-fixes-xamarinforms branch March 26, 2022 01:37
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@samhouts samhouts added the fixed-in-6.0.300-rc.1 Look for this fix in 6.0.300-rc.1! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-6.0.300-rc.1 Look for this fix in 6.0.300-rc.1! t/housekeeping ♻︎
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants