Beispiel #1
0
        private async Task SetErrorViewAsync()
        {
            Debug.WriteLine("NewsViewModel - SetServiceError()");

            if (ErrorKind == ServiceErrorKind.None)
            {
                return;
            }

            if (IsRefreshing)
            {
                IsRefreshing = false;
            }

            var eventPage = ErrorKind.ToNewsServiceErrorPage();

            _eventTracker.Display(eventPage);

            ErrorTitle       = ErrorKind.ToTitle();
            ErrorDescription = ErrorKind.ToMessage();

            if (HasEmptyData)
            {
                ShowErrorView = true;
            }
            else
            {
                await UserDialogs.Instance.AlertAsync(ErrorDescription, ErrorTitle, "OK");
            }
        }
        private void SetErrorView()
        {
            Debug.WriteLine($"BookingViewModel - SetErrorView()");

            if (ErrorKind == ServiceErrorKind.None)
            {
                return;
            }

            var eventPage = ErrorKind.ToBookingWebviewErrorPage();

            _eventTracker.Display(eventPage);

            ErrorTitle       = ErrorKind.ToTitle();
            ErrorDescription = ErrorKind.ToMessage();

            ShowErrorView = true;
        }