Permalink
Browse files

Removed old bookmark code in DocSet class

  • Loading branch information...
1 parent 74e5471 commit f6c4edc898ab50b1ed9e0fed15bc918e91afe2a2 Ole Zorn committed May 25, 2012
Showing with 1 addition and 25 deletions.
  1. +0 −4 Classes/DocSet.h
  2. +1 −21 Classes/DocSet.m
View
@@ -30,8 +30,6 @@ typedef void(^DocSetSearchCompletionHandler)(NSString *searchTerm, NSArray *resu
BOOL loadingTokens;
NSArray *tokens;
NSArray *nodeInfos;
-
- NSMutableArray *bookmarks;
}
@property (nonatomic, strong, readonly) NSString *path;
@@ -40,12 +38,10 @@ typedef void(^DocSetSearchCompletionHandler)(NSString *searchTerm, NSArray *resu
@property (nonatomic, strong, readonly) NSString *bundleID;
@property (nonatomic, strong, readonly) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, strong, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;
-@property (nonatomic, strong, readonly) NSMutableArray *bookmarks;
- (id)initWithPath:(NSString *)docSetPath;
- (NSArray *)nodeSectionsForRootNode:(NSManagedObject *)rootNode;
- (BOOL)nodeIsExpandable:(NSManagedObject *)node;
-- (void)saveBookmarks;
- (void)prepareSearch;
- (void)searchForNodesMatching:(NSString *)searchTerm completion:(DocSetSearchCompletionHandler)completion;
- (void)searchForTokensMatching:(NSString *)searchTerm completion:(DocSetSearchCompletionHandler)completion;
View
@@ -11,7 +11,7 @@
@implementation DocSet
-@synthesize path, title, copyright, bundleID, bookmarks;
+@synthesize path, title, copyright, bundleID;
- (id)initWithPath:(NSString *)docSetPath
{
@@ -34,29 +34,9 @@ - (id)initWithPath:(NSString *)docSetPath
searchQueue = dispatch_queue_create("DocSet Search Queue", NULL);
- //NSLog(@"Legacy bookmarks: %@", self.bookmarks);
-
return self;
}
-- (NSMutableArray *)bookmarks
-{
- //load bookmarks lazily:
- if (!bookmarks) {
- NSString *bookmarksPath = [path stringByAppendingPathComponent:@"Bookmarks.plist"];
- bookmarks = [NSMutableArray arrayWithContentsOfFile:bookmarksPath];
- if (!bookmarks) {
- bookmarks = [NSMutableArray array];
- }
- }
- return bookmarks;
-}
-
-- (void)saveBookmarks
-{
- NSString *bookmarksPath = [path stringByAppendingPathComponent:@"Bookmarks.plist"];
- [[self bookmarks] writeToFile:bookmarksPath atomically:YES];
-}
- (void)prepareSearch
{

0 comments on commit f6c4edc

Please sign in to comment.