зеркало из https://github.com/nextcloud/desktop.git
OS X Overlay Icons: Fix request for sync dir itself
This commit is contained in:
Родитель
f25a590af5
Коммит
02f971b534
|
@ -118,7 +118,7 @@ static ContentManager* sharedInstance = nil;
|
|||
|
||||
if (![_fileNamesCache objectForKey:normalizedPath] || ![[_fileNamesCache objectForKey:normalizedPath] isEqualTo:res]) {
|
||||
[_fileNamesCache setObject:res forKey:normalizedPath];
|
||||
// NSLog(@"SET value %d", [res intValue]);
|
||||
//NSLog(@"SET value %d %@", [res intValue], normalizedPath);
|
||||
_hasChangedContent = YES;
|
||||
[self performSelector:@selector(repaintAllWindowsIfNeeded) withObject:0 afterDelay:1.0]; // 1 sec
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ static ContentManager* sharedInstance = nil;
|
|||
}
|
||||
|
||||
NSNumber* result = [_fileNamesCache objectForKey:normalizedPath];
|
||||
// NSLog(@"XXXXXXX Asking for icon for path %@ = %d",path, [result intValue]);
|
||||
// NSLog(@"XXXXXXX Asking for icon for path %@ = %d",normalizedPath, [result intValue]);
|
||||
|
||||
if( result == nil ) {
|
||||
// start the async call
|
||||
|
@ -192,15 +192,22 @@ static ContentManager* sharedInstance = nil;
|
|||
|
||||
- (void)reFetchFileNameCacheForPath:(NSString*)path
|
||||
{
|
||||
// NSLog(@"%@", NSStringFromSelector(_cmd));
|
||||
NSLog(@"%@", NSStringFromSelector(_cmd));
|
||||
|
||||
for (id p in [_fileNamesCache keyEnumerator]) {
|
||||
if ( path && [p hasPrefix:path] ) {
|
||||
NSNumber *askState = [[RequestManager sharedInstance] askForIcon:p isDirectory:false]; // FIXME
|
||||
//[_fileNamesCache setObject:askState forKey:p];
|
||||
NSLog(@"%@ %@", NSStringFromSelector(_cmd), p);
|
||||
[[RequestManager sharedInstance] askForIcon:p isDirectory:false]; // FIXME isDirectory parameter
|
||||
//[_fileNamesCache setObject:askState forKey:p]; We don't do this since we want to keep the old icon meanwhile
|
||||
//NSLog(@"%@ %@", NSStringFromSelector(_cmd), p);
|
||||
}
|
||||
}
|
||||
|
||||
// Ask for directory itself
|
||||
if ([path hasSuffix:@"/"]) {
|
||||
path = [path substringToIndex:path.length - 1];
|
||||
}
|
||||
[[RequestManager sharedInstance] askForIcon:path isDirectory:true];
|
||||
//NSLog(@"%@ %@", NSStringFromSelector(_cmd), path);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
}
|
||||
|
||||
NSNumber* imageIndex = [[ContentManager sharedInstance] iconByPath:[url path] isDirectory:isDir];
|
||||
// NSLog(@"2 The icon index is %d", [imageIndex intValue]);
|
||||
//NSLog(@"2 The icon index is %d %@ %@", [imageIndex intValue], [url path], isDir ? @"isDir" : @"");
|
||||
|
||||
if ([imageIndex intValue] > 0)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче