aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFavoritesController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPFavoritesController.m')
-rw-r--r--Source/SPFavoritesController.m10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/SPFavoritesController.m b/Source/SPFavoritesController.m
index 45eb5c9a..1dee4a2b 100644
--- a/Source/SPFavoritesController.m
+++ b/Source/SPFavoritesController.m
@@ -262,6 +262,8 @@ static SPFavoritesController *sharedFavoritesController = nil;
SPGroupNode *rootGroupNode = [[SPGroupNode alloc] init];
SPGroupNode *favoritesGroupNode = [[SPGroupNode alloc] initWithName:[[root objectForKey:SPFavoritesGroupNameKey] uppercaseString]];
+ [favoritesGroupNode setNodeIsExpanded:[[root objectForKey:SPFavoritesGroupIsExpandedKey] boolValue]];
+
SPTreeNode *rootNode = [[SPTreeNode alloc] initWithRepresentedObject:rootGroupNode];
SPTreeNode *favoritesNode = [[SPTreeNode alloc] initWithRepresentedObject:favoritesGroupNode];
@@ -282,7 +284,7 @@ static SPFavoritesController *sharedFavoritesController = nil;
[favoritesNode release];
favoritesTree = rootNode;
-
+
pthread_mutex_unlock(&favoritesLock);
}
@@ -298,11 +300,13 @@ static SPFavoritesController *sharedFavoritesController = nil;
{
id node = nil;
SPTreeNode *treeNode = nil;
-
+
if ([nodeData objectForKey:SPFavoritesGroupNameKey] && [nodeData objectForKey:SPFavoriteChildrenKey]) {
node = [[SPGroupNode alloc] initWithName:[nodeData objectForKey:SPFavoritesGroupNameKey]];
+ [node setNodeIsExpanded:[[nodeData objectForKey:SPFavoritesGroupIsExpandedKey] boolValue]];
+
treeNode = [[SPTreeNode alloc] initWithRepresentedObject:node];
[node release];
@@ -323,7 +327,7 @@ static SPFavoritesController *sharedFavoritesController = nil;
[node release];
}
-
+
return [treeNode autorelease];
}