Esempio n. 1
0
 // Function Video
 public void Add(Get_User_Data_Object.Following user)
 {
     try
     {
         var check = mMyFriendsList.FirstOrDefault(a => a.user_id == user.user_id);
         if (check == null)
         {
             mMyFriendsList.Add(user);
             NotifyItemInserted(mMyFriendsList.IndexOf(mMyFriendsList.Last()));
         }
     }
     catch (Exception exception)
     {
         Crashes.TrackError(exception);
     }
 }
Esempio n. 2
0
        public void Initialize(MyFriendsAdapterViewHolder holder, Get_User_Data_Object.Following item)
        {
            try
            {
                var AvatarSplit     = item.avatar.Split('/').Last();
                var getImage_Avatar = IMethods.MultiMedia.GetMediaFrom_Disk(IMethods.IPath.FolderDiskImage, AvatarSplit);
                if (getImage_Avatar != "File Dont Exists")
                {
                    if (holder.Image.Tag?.ToString() != "loaded")
                    {
                        ImageServiceLoader.Load_Image(holder.Image, "no_profile_image.png", getImage_Avatar, 1);
                        holder.Image.Tag = "loaded";
                    }
                }
                else
                {
                    if (holder.Image.Tag?.ToString() != "loaded")
                    {
                        IMethods.MultiMedia.DownloadMediaTo_DiskAsync(IMethods.IPath.FolderDiskImage, item.avatar);
                        ImageServiceLoader.Load_Image(holder.Image, "no_profile_image.png", item.avatar, 1);
                        holder.Image.Tag = "loaded";
                    }
                }

                var CoverSplit     = item.cover.Split('/').Last();
                var getImage_Cover = IMethods.MultiMedia.GetMediaFrom_Disk(IMethods.IPath.FolderDiskImage, CoverSplit);
                if (getImage_Cover == "File Dont Exists")
                {
                    IMethods.MultiMedia.DownloadMediaTo_DiskAsync(IMethods.IPath.FolderDiskImage, item.cover);
                }
            }
            catch (Exception e)
            {
                Crashes.TrackError(e);
            }
        }