diff --git a/Simplenote/SimplenoteAppDelegate.m b/Simplenote/SimplenoteAppDelegate.m index bc08f6d1e..376a760ae 100644 --- a/Simplenote/SimplenoteAppDelegate.m +++ b/Simplenote/SimplenoteAppDelegate.m @@ -124,8 +124,6 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification [self cleanupTags]; [self startListeningForThemeNotifications]; - [self indexSpotlightItemsIfNeeded]; - [SPTracker trackApplicationLaunched]; } @@ -573,37 +571,4 @@ - (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)window return [[self managedObjectContext] undoManager]; } - -#pragma mark ================================================================================ -#pragma mark Spotlight -#pragma mark ================================================================================ - -- (void)indexSpotlightItemsIfNeeded -{ - // This process should be executed *just once*, and only if the user is already logged in (AKA "Upgrade") - NSString *kSpotlightDidRunKey = @"SpotlightDidRunKey"; - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - - if ([defaults boolForKey:kSpotlightDidRunKey] == true) { - return; - } - - [defaults setBool:true forKey:kSpotlightDidRunKey]; - [defaults synchronize]; - - if (self.simperium.user.authenticated == false) { - return; - } - - [self indexSpotlightItems]; -} - -- (void)indexSpotlightItems -{ - NSManagedObjectContext *context = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType]; - [context setParentContext:self.simperium.managedObjectContext]; - - [[CSSearchableIndex defaultSearchableIndex] indexSpotlightItemsIn:context]; -} - @end