private void OnFavoriteTagChanged(RecipeFavoriteTagChanged message) { if (message.RecipeId == Id) { IsFavorite = message.IsFavorite; } }
private void OnRecipeFavoriteTagChanged(RecipeFavoriteTagChanged message) { if (!Query.OnlyFavorite) { return; } var recipe = Recipes.FirstOrDefault(x => x.Id == message.RecipeId); if (recipe != null) { Recipes.Remove(recipe); } if (Recipes.Count == 0) { RaisePropertyChanged(() => IsEmpty); } }