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 Aug 11, 2021
1 parent 8e268d3 commit 7280f18
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/Compatibility/Core/src/Compatibility-net6.csproj
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ partial void ClipChanged()
_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
3 changes: 1 addition & 2 deletions src/Essentials/src/Essentials-net6.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
<Compile Include="**\*.watchos.cs" />
<Compile Include="**\*.watchos.*.cs" />
</ItemGroup> -->
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'net6.0-tizen' ">
<PackageReference Include="Tizen.NET" Version="4.0.0" PrivateAssets="All" />
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'tizen'" >
<Compile Include="**\*.tizen.cs" />
<Compile Include="**\*.tizen.*.cs" />
</ItemGroup>
Expand Down
12 changes: 5 additions & 7 deletions src/Essentials/src/TextToSpeech/TextToSpeech.tizen.cs
Original file line number Diff line number Diff line change
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 7280f18

Please sign in to comment.