protected override void OnAppearing() { base.OnAppearing(); Task.Run(async() => { _currentAdvice = await Instance.GetInfoAsync(); Update(_currentAdvice); }); }
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); }