Skip to content

Commit

Permalink
Fix build error (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
myroot authored and rookiejava committed Sep 1, 2021
1 parent 3fddfee commit e758187
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/Compatibility/Core/src/Compatibility-net6.csproj
Expand Up @@ -55,7 +55,7 @@
<ProjectReference Include="..\..\Android.FormsViewGroup\src\Compatibility.Android.FormsViewGroup-net6.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'net6.0-tizen'" >
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'tizen'" >
<Compile Include="$(TizenRoot)**\*.cs"></Compile>
<EmbeddedResource Include="$(TizenRoot)Resources\*.resx" />
<EmbeddedResource Include="$(TizenRoot)Resources\*.png" />
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/Animations/NativeTicker.Tizen.cs
Expand Up @@ -19,7 +19,7 @@ public NativeTicker()
}

_context = SynchronizationContext.Current;
_timer = new Timer((object o) => HandleElapsed(o), this, Timeout.Infinite, Timeout.Infinite);
_timer = new Timer((object? o) => HandleElapsed(o), this, Timeout.Infinite, Timeout.Infinite);
}

public override void Start()
Expand All @@ -34,7 +34,7 @@ public override void Stop()
_isRunning = false;
}

void HandleElapsed(object state)
void HandleElapsed(object? state)
{
_context?.Post((o) => Fire?.Invoke(), null);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Handlers/Entry/EntryHandler.Tizen.cs
Expand Up @@ -187,7 +187,7 @@ void OnCursorChanged(object? sender, EventArgs e)
VirtualView.CursorPosition = position;
}

void OnSelectionCleared(object sender, EventArgs e)
void OnSelectionCleared(object? sender, EventArgs e)
{
if (VirtualView == null || NativeView == null)
return;
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Tizen/CoreUIAppContext.cs
Expand Up @@ -177,7 +177,7 @@ void InitializeMainWindow()
MainWindow.BackButtonPressed += OnBackButtonPressed;
}

void OnBackButtonPressed(object sender, EventArgs e)
void OnBackButtonPressed(object? sender, EventArgs e)
{
if (!(_handleBackButtonPressed?.Invoke() ?? false))
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Tizen/ModalStack.cs
Expand Up @@ -77,7 +77,7 @@ void UpdateTopView()
{
_lastTop?.Hide();
_lastTop = InternalStack.LastOrDefault();
_lastTop.Show();
_lastTop?.Show();
(_lastTop as Widget)?.SetFocus(true);
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/Core/src/Platform/Tizen/TransformationExtensions.cs
Expand Up @@ -129,8 +129,9 @@ public static void Perspective3D(this EvasMap map, int px, int py, int z0, int f
{
var mapType = typeof(EvasMap);
var propInfo = mapType.GetProperty("Handle", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
var handle = (IntPtr)propInfo.GetValue(map);
evas_map_util_3d_perspective(handle, px, py, z0, foc);
IntPtr? handle = (IntPtr?)propInfo?.GetValue(map);
if (handle != null)
evas_map_util_3d_perspective(handle.Value, px, py, z0, foc);
}

[DllImport("libevas.so.1")]
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/Platform/Tizen/WrapperView.cs
Expand Up @@ -52,7 +52,7 @@ public WrapperView(EvasObject parent) : base(parent)
_clipperView.Value.Invalidate();
}

void OnClipPaint(object sender, SKPaintSurfaceEventArgs e)
void OnClipPaint(object? sender, SKPaintSurfaceEventArgs e)
{
var canvas = e.Surface.Canvas;
canvas.Clear();
Expand Down Expand Up @@ -83,7 +83,7 @@ void OnClipPaint(object sender, SKPaintSurfaceEventArgs e)
}
}

void OnLayout(object sender, Tizen.UIExtensions.Common.LayoutEventArgs e)
void OnLayout(object? sender, Tizen.UIExtensions.Common.LayoutEventArgs e)
{
if (Content != null)
{
Expand Down
1 change: 0 additions & 1 deletion src/Essentials/src/Essentials-net6.csproj
Expand Up @@ -54,7 +54,6 @@
<Compile Include="**\*.watchos.*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup> -->
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'tizen' ">
<PackageReference Include="Tizen.NET" Version="4.0.0" PrivateAssets="All" />
<Compile Include="**\*.tizen.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Include="**\*.tizen.*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>
Expand Down
12 changes: 5 additions & 7 deletions src/Essentials/src/TextToSpeech/TextToSpeech.tizen.cs
Expand Up @@ -20,14 +20,12 @@ internal static async Task PlatformSpeakAsync(string text, SpeechOptions options
await tcsUtterances.Task;

tcsUtterances = new TaskCompletionSource<bool>();
if (cancelToken != null)

cancelToken.Register(() =>
{
cancelToken.Register(() =>
{
tts?.Stop();
tcsUtterances?.TrySetResult(true);
});
}
tts?.Stop();
tcsUtterances?.TrySetResult(true);
});

var language = "en_US";
var voiceType = Voice.Auto;
Expand Down

0 comments on commit e758187

Please sign in to comment.