Skip to content

Commit

Permalink
Fix build and runtime error after bumping to latest code
Browse files Browse the repository at this point in the history
  • Loading branch information
rookiejava committed Sep 2, 2021
1 parent 96ff0a6 commit 8e54a9c
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 19 deletions.
3 changes: 3 additions & 0 deletions src/Compatibility/Core/src/AppHostBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ static MauiAppBuilder SetupDefaults(this MauiAppBuilder builder)
handlers.TryAddCompatibilityRenderer(typeof(ViewCell), typeof(ViewCellRenderer));
handlers.TryAddCompatibilityRenderer(typeof(SwitchCell), typeof(SwitchCellRenderer));
#if TIZEN
handlers.TryAddCompatibilityRenderer(typeof(ContentView), typeof(LayoutRenderer));
#else
// This is for Layouts that currently don't work when assigned to LayoutHandler
handlers.TryAddCompatibilityRenderer(typeof(ContentView), typeof(DefaultRenderer));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.Maui.Layouts;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Controls.Platform;
using ERect = ElmSharp.Rect;
Expand Down
18 changes: 0 additions & 18 deletions src/Controls/src/Core/HandlerImpl/Label/Label.Tizen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,6 @@ namespace Microsoft.Maui.Controls
{
public partial class Label
{
public static void RemapForControls()
{
// Adjust the mappings to preserve Controls.Label legacy behaviors
// ILabel does not include the TextType property, so we map it here to handle HTML text
// And we map some of the other property handlers to Controls-specific versions that avoid steppingon HTML text settings

IPropertyMapper<ILabel, LabelHandler> ControlsLabelMapper = new PropertyMapper<Label, LabelHandler>(LabelHandler.LabelMapper)
{
[nameof(TextType)] = MapTextType,
[nameof(Text)] = MapText,
[nameof(TextDecorations)] = MapTextDecorations,
[nameof(ILabel.Font)] = MapFont,
[nameof(TextColor)] = MapTextColor
};

LabelHandler.LabelMapper = ControlsLabelMapper;
}

public static void MapTextType(LabelHandler handler, Label label)
{
handler.NativeView?.UpdateText(label);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using static Microsoft.Maui.Controls.Button;
using EButton = ElmSharp.Button;

namespace Microsoft.Maui.Controls.Platform
{
public static class ButtonExtensions
{
public static void UpdateContentLayout(this EButton nativeButton, Button button)
{
//TODO : Need to impl
}
}
}
4 changes: 4 additions & 0 deletions src/Core/src/Handlers/Button/ButtonHandler.Tizen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public static void MapTextColor(ButtonHandler handler, IButton button)
handler.NativeView?.UpdateTextColor(button);
}

//TODO : Need to impl
[MissingMapper]
public static void MapImageSource(ButtonHandler handler, IButton image) { }

[MissingMapper]
public static void MapCharacterSpacing(ButtonHandler handler, IButton button) { }

Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Handlers/View/ViewHandlerOfT.Tizen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ protected virtual void Dispose(bool disposing)
if (disposing)
{
(this as IElementHandler)?.DisconnectHandler();
NativeView?.Unrealize();
base.NativeView?.Unrealize();
ContainerView?.Unrealize();
}

Expand Down
13 changes: 13 additions & 0 deletions src/Core/src/Platform/Tizen/FlowDirectionExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using ElmSharp;

namespace Microsoft.Maui
{
internal static class FlowDirectionExtensions
{
internal static void UpdateFlowDirection(this EvasObject nativeView, IView view)
{
// TODO: Need to impl
}
}
}

0 comments on commit 8e54a9c

Please sign in to comment.