예제 #1
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            Task.Run(async() =>
            {
                _currentAdvice = await Instance.GetInfoAsync();
                Update(_currentAdvice);
            });
        }
예제 #2
0
        async Task BadSwipeInvokedAsync(System.Object sender, System.EventArgs e)
        {
            Console.WriteLine("Bad Swipe");
            var config = new ToastConfig($"advice #{_currentAdvice.Slip.Id} added to bad list")
            {
                Position = ToastPosition.Top
            };

            UserDialogs.Instance.Toast(config);

            await Instance.AddToBadAdviceAsync(_currentAdvice);

            _currentAdvice = await Instance.GetInfoAsync();

            Update(_currentAdvice);
        }