Beispiel #1
0
        private void GifManager_AddedAsFavouriteEvent(object sender, GifItem gifItem)
        {
            var item = GifItems?.FirstOrDefault(x => x.Id == gifItem.Id);

            if (item == null)
            {
                GifItems.Add(new GifItemViewModel(gifItem));
            }
        }
Beispiel #2
0
        private void GifManager_RemovedAsFavouriteEvent(object sender, GifItem gifItem)
        {
            var item = GifItems?.FirstOrDefault(x => x.Id == gifItem.Id);

            if (item != null)
            {
                GifItems?.Remove(item);
            }
        }
        private void GifManager_AddedAsFavouriteEvent(object sender, GifItem gifItem)
        {
            var item = GifItems?.FirstOrDefault(x => x.Id == gifItem.Id);

            if (item != null)
            {
                item.IsFavourite = true;
            }
        }