#import "ASIPithos.h"
#import "ASIPithosAccount.h"
#import "ASIDownloadCache.h"
+#import "PithosAccount.h"
#import "PithosUtilities.h"
#import "PithosActivityFacility.h"
DLog(@"using newChildren");
newChildren = [[NSMutableArray alloc] init];
NSMutableIndexSet *keptNodes = [NSMutableIndexSet indexSet];
+ NSMutableArray *sharingAccountsNames = [NSMutableArray arrayWithCapacity:sharingAccounts.count];
for (ASIPithosAccount *account in sharingAccounts) {
+ [sharingAccountsNames addObject:account.name];
if (![account.name isEqualToString:pithos.authUser]) {
PithosAccountNode *node = [[PithosAccountNode alloc] initWithPithos:pithos];
node.parent = self;
node.shared = shared;
node.sharingAccount = account.name;
node.inheritChildrenUpdatedNotificationName = inheritChildrenUpdatedNotificationName;
+ node.pithosAccountManager = pithosAccountManager;
if (children) {
NSUInteger oldIndex = [children indexOfObject:node];
if (oldIndex != NSNotFound) {
[newChildren addObject:node];
}
}
+ [pithosAccountManager updateUserCatalogForForDisplaynames:nil UUIDs:sharingAccountsNames];
[[children objectsAtIndexes:
[[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [children count])] indexesPassingTest:^(NSUInteger idx, BOOL *stop){
if ([keptNodes containsIndex:idx])