Skip to content

Commit

Permalink
chore: misc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 committed Sep 26, 2024
1 parent 3928870 commit c1d99c3
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#nullable enable
#if false // fixme@xy: to remove the constant; temporarily added to test backward compat
#define USE_NEW_TP_CODEGEN
#endif

using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -921,7 +918,6 @@ private void BuildChildSubclasses(IIndentedStringBuilder writer, bool isTopLevel

if (_isHotReloadEnabled)
{
// fixme@xy: find and update caller(s)
// Build an interface that can be used to hide the actual replaced
// implementation of a type during hot reload.
using (writer.BlockInvariant($"internal interface {hrInterfaceName}"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public class Given_FrameworkTemplatePool
//#if __ANDROID__
//[Ignore("https://github.com/unoplatform/uno/issues/13969")]
//#endif
// todo@xy: create new issue and link it here
[Ignore("Template pooling is globally disabled on all-platforms for #13969. With TemplatedParent rework, the recycling part was not re-introduced/updated.")]
[Ignore("#18317 With TemplatedParent rework, the recycling part was not re-introduced/updated.")]
public async Task When_Recycle()
{
using (FeatureConfigurationHelper.UseTemplatePooling())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private protected override void OnLoaded()

if (_commandBar == null)
{
commandBar = GetTemplatedParent() as CommandBar; // todo@xy: validate
commandBar = GetTemplatedParent() as CommandBar;
_commandBar = new WeakReference<CommandBar?>(commandBar);
}

Expand Down
1 change: 0 additions & 1 deletion src/Uno.UI/Controls/NativeFramePresenter.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ protected override Size ArrangeOverride(Size finalSize)

private protected override void SetTemplatedParentImpl(DependencyObject parent)
{
// todo@xy: review if this makes sense?
base.SetTemplatedParentImpl(parent);

InitializeController(parent as Frame);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ partial class ScrollContentPresenter : IFrameworkTemplatePoolAware

private object RealContent => Native?.Content;

public void OnTemplateRecycled() // fixme@xy: review
public void OnTemplateRecycled() // #18317 re-impl template recycling
{
// If the template is being recycled and it's TemplatedParent is null, this means that
// this instance was part of the ControlTemplate of a ScrollViewer instance that was GC'ed.
Expand Down
1 change: 0 additions & 1 deletion src/Uno.UI/UI/Xaml/FrameworkTemplatePool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ internal int GetPooledTemplatesCount()
}
else
{
// fixme@xy?: Stack::TryPop?
int position = info.PooledInstances.Count - 1;
instance = info.PooledInstances[position].Control;
info.PooledInstances.RemoveAt(position);
Expand Down

0 comments on commit c1d99c3

Please sign in to comment.