Ejemplo n.º 1
0
 public void AddOrUpdateFolderItem(FolderItem item)
 {
     if (FolderCollection.Contains(item))
     {
         int sourceIndex = FolderCollection.IndexOf(item);
         FolderCollection.Remove(item);
         FolderCollection.Insert(sourceIndex, item);
         if (CurrentSelectedFolder != null && CurrentSelectedFolder.Equals(item))
         {
             CurrentSelectedFolderChanged?.Invoke(this, item);
         }
         IsFolderListChanged = true;
     }
     else
     {
         FolderCollection.Add(item);
         IsFolderListChanged = true;
     }
 }