///-------------------------------------------------------------------------------------------------
        /// Pull Request - manually added/fixed
        ///		Added IsAuthenticated check #88
        ///		https://github.com/xamarin/Xamarin.Auth/pull/88
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);

            if (authenticator.AllowCancel && authenticator.IsAuthenticated())
            {
                Cancel();
            }
        }
Exemplo n.º 2
0
        ///-------------------------------------------------------------------------------------------------
        /// Pull Request - manually added/fixed
        ///		Added IsAuthenticated check #88
        ///		https://github.com/xamarin/Xamarin.Auth/pull/88
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);

            if (authenticator.AllowCancel && authenticator.IsAuthenticated())
            {
                Cancel();
            }

            // COSMOS
            // note, key is "loading" rather than "isLoading" which the property is exported as
            wk_loading_observer = wk_web_view.AddObserver("loading", NSKeyValueObservingOptions.New, (observedchange) =>
            {
                System.Diagnostics.Debug.WriteLine($"loading: {wk_web_view.IsLoading}");
                if (wk_web_view.IsLoading)
                {
                    this.activity.StartAnimating();
                }
                else
                {
                    this.activity.StopAnimating();
                }
            });
        }