private void OnFavoriteTagChanged(RecipeFavoriteTagChanged message)
 {
     if (message.RecipeId == Id)
     {
         IsFavorite = message.IsFavorite;
     }
 }
示例#2
0
        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);
            }
        }