private void SaveCustomRating() { var valuesChanged = ViewModel.Card.CustomRatingValue != ViewModel.CustomRatingSelected || ViewModel.Card.CustomRatingDescription != ViewModel.CustomRatingDescription; if (valuesChanged) { ViewModel.Card.CustomRatingDescription = ViewModel.CustomRatingDescription; ViewModel.Card.CustomRatingValue = ViewModel.CustomRatingSelected; ViewModelDrafting.RefreshCardsDraft(); ViewModelDrafting.Api.SaveCustomDraftRating(ViewModel.Card.ArenaId, ViewModel.CustomRatingSelected, ViewModel.CustomRatingDescription); } }
private void SaveCustomRating() { var customRatingInitialized = ViewModel.Card.CustomRatingValue != null || ViewModel.CustomRatingSelected != 0; var valuesChanged = (customRatingInitialized && ViewModel.Card.CustomRatingValue != ViewModel.CustomRatingSelected) || ViewModel.Card.CustomRatingDescription != ViewModel.CustomRatingDescription; if (valuesChanged) { Task.Factory.StartNew(() => { ViewModel.Card.CustomRatingDescription = ViewModel.CustomRatingDescription; ViewModel.Card.CustomRatingValue = ViewModel.CustomRatingSelected; ViewModelDrafting.RefreshCardsDraft(); ViewModelDrafting.Api.SaveCustomDraftRating(ViewModel.Card.ArenaId, ViewModel.CustomRatingSelected, ViewModel.CustomRatingDescription); }); } }