mirror of
https://github.com/transmission/transmission
synced 2025-02-03 21:12:05 +00:00
eliminate an unneeded function
This commit is contained in:
parent
eb283833a9
commit
86e63d3feb
2 changed files with 16 additions and 20 deletions
|
@ -181,7 +181,6 @@
|
|||
- (void) torrentStoppedForRatio: (NSNotification *) notification;
|
||||
|
||||
- (void) changeAutoImport;
|
||||
- (void) newCheckAutoImportDirectory;
|
||||
- (void) checkAutoImportDirectory;
|
||||
|
||||
- (void) sleepCallBack: (natural_t) messageType argument: (void *) messageArgument;
|
||||
|
|
|
@ -1837,27 +1837,24 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
|||
-(void) watcher: (id<UKFileWatcher>) watcher receivedNotification: (NSString *) notification forPath: (NSString *) path
|
||||
{
|
||||
if ([notification isEqualToString: UKFileWatcherWriteNotification])
|
||||
[self newCheckAutoImportDirectory];
|
||||
}
|
||||
|
||||
- (void) newCheckAutoImportDirectory
|
||||
{
|
||||
if (![fDefaults boolForKey: @"AutoImport"])
|
||||
return;
|
||||
|
||||
if (fAutoImportTimer)
|
||||
{
|
||||
if ([fAutoImportTimer isValid])
|
||||
[fAutoImportTimer invalidate];
|
||||
[fAutoImportTimer release];
|
||||
fAutoImportTimer = nil;
|
||||
if (![fDefaults boolForKey: @"AutoImport"])
|
||||
return;
|
||||
|
||||
if (fAutoImportTimer)
|
||||
{
|
||||
if ([fAutoImportTimer isValid])
|
||||
[fAutoImportTimer invalidate];
|
||||
[fAutoImportTimer release];
|
||||
fAutoImportTimer = nil;
|
||||
}
|
||||
|
||||
//check again in 10 seconds in case torrent file wasn't complete
|
||||
fAutoImportTimer = [[NSTimer scheduledTimerWithTimeInterval: 10.0 target: self
|
||||
selector: @selector(checkAutoImportDirectory) userInfo: nil repeats: NO] retain];
|
||||
|
||||
[self checkAutoImportDirectory];
|
||||
}
|
||||
|
||||
//check again in 10 seconds in case torrent file wasn't complete
|
||||
fAutoImportTimer = [[NSTimer scheduledTimerWithTimeInterval: 10.0 target: self
|
||||
selector: @selector(checkAutoImportDirectory) userInfo: nil repeats: NO] retain];
|
||||
|
||||
[self checkAutoImportDirectory];
|
||||
}
|
||||
|
||||
- (void) changeAutoImport
|
||||
|
|
Loading…
Reference in a new issue