diff --git a/App/App.xaml.cs b/App/App.xaml.cs index 927c06fb..f73d5f67 100644 --- a/App/App.xaml.cs +++ b/App/App.xaml.cs @@ -106,8 +106,11 @@ public void RemoveLoadingIndicator() IsLoading = false; // Close the popup - this.LoadingIndicator.Close(); - } + MainThread.BeginInvokeOnMainThread(() => + { + this.LoadingIndicator.Close(); + }); + } /// /// Function to close the database /// @@ -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) {