Skip to content

Commit

Permalink
fix Threading - iOS | fix crash on launch
Browse files Browse the repository at this point in the history
  • Loading branch information
bricefriha committed Jan 13, 2025
1 parent 3cf4a6f commit 57a42a7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions App/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,11 @@ public void RemoveLoadingIndicator()
IsLoading = false;

// Close the popup
this.LoadingIndicator.Close();
}
MainThread.BeginInvokeOnMainThread(() =>
{
this.LoadingIndicator.Close();
});
}
/// <summary>
/// Function to close the database
/// </summary>
Expand Down Expand Up @@ -217,8 +220,10 @@ public void OpenPopUp(Popup popUp, Page page = null)
page = GetCurrentPage();
if (page.Navigation.NavigationStack.Any(p => p?.Id == popUp?.Id))
return;

page.ShowPopup(popUp);
MainThread.BeginInvokeOnMainThread(() =>
{
page.ShowPopup(popUp);
});
}
catch (Exception ex)
{
Expand Down

0 comments on commit 57a42a7

Please sign in to comment.