Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Miller committed May 6, 2024
1 parent fc06f61 commit 55f1c6e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Core/src/Platform/Tizen/WindowExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ public static void SetContent(this Window platformWindow, View content)
content.HeightResizePolicy = ResizePolicyType.FillToParent;
content.WidthResizePolicy = ResizePolicyType.FillToParent;

if (s_modalStacks.ContainsKey(platformWindow))
if (s_modalStacks.TryGetValue(platformWindow, out var modalStack))
{
var modalStack = s_modalStacks[platformWindow];
modalStack.Clear();
modalStack.Push(content, true);
}
Expand Down Expand Up @@ -62,8 +61,8 @@ public static void Initialize(this Window platformWindow)

public static NavigationStack? GetModalStack(this Window platformWindow)
{
if (s_modalStacks.ContainsKey(platformWindow))
return s_modalStacks[platformWindow];
if (s_modalStacks.TryGetValue(platformWindow, out var modalStack))
return modalStack;
return null;
}

Expand Down Expand Up @@ -103,14 +102,14 @@ static void OnRotate(Window platformWindow)

static void OnBackButtonPressed(Window platformWindow)
{
if (s_windowBackButtonPressedHandler.ContainsKey(platformWindow))
if (s_windowBackButtonPressedHandler.TryGetValue(platformWindow, out var pressedHandler))
{
if (s_windowBackButtonPressedHandler[platformWindow].Invoke())
if (pressedHandler.Invoke())
return;
}

if (s_windowCloseRequestHandler.ContainsKey(platformWindow))
s_windowCloseRequestHandler[platformWindow].Invoke();
if (s_windowCloseRequestHandler.TryGetValue(platformWindow, out var requestHandler))
requestHandler.Invoke();
}

internal static void UpdateX(this Window platformWindow, IWindow window) =>
Expand Down

0 comments on commit 55f1c6e

Please sign in to comment.