[Pkg-owncloud-commits] [owncloud-client] 428/498: shell_i: Don't request statuses on UPDATE_VIEW

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:13 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit dcf7e8a6318aa34f306b47ba3f764dd938b56624
Author: Jocelyn Turcotte <jturcotte at woboq.com>
Date:   Fri Jul 31 21:40:51 2015 +0200

    shell_i: Don't request statuses on UPDATE_VIEW
    
    Now that the client is pushing all changes of state, we don't need
    to track the requested URLs anymore and risk that the way that we
    reseted that list could leave a few entries in Finder's cache outdated.
    
    We can remove the same code from other platforms in a later release,
    a bit earlier than a week before beta1.
---
 .../OwnCloudFinder.xcodeproj/project.pbxproj       |  4 ++--
 .../OwnCloudFinderSync/FinderSyncExt/FinderSync.m  | 24 ----------------------
 .../OwnCloudFinderSync.xcodeproj/project.pbxproj   |  4 ++--
 3 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/shell_integration/MacOSX/OwnCloudFinder/OwnCloudFinder.xcodeproj/project.pbxproj b/shell_integration/MacOSX/OwnCloudFinder/OwnCloudFinder.xcodeproj/project.pbxproj
index 1ef5350..ccd1eda 100644
--- a/shell_integration/MacOSX/OwnCloudFinder/OwnCloudFinder.xcodeproj/project.pbxproj
+++ b/shell_integration/MacOSX/OwnCloudFinder/OwnCloudFinder.xcodeproj/project.pbxproj
@@ -286,7 +286,7 @@
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Library/Bundles";
 				OC_APPLICATION_REV_DOMAIN = com.owncloud.desktopclient;
-				OC_TEAM_IDENTIFIER_PREFIX = "";
+				OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX = "";
 				PRODUCT_NAME = SyncStateFinder;
 				WRAPPER_EXTENSION = bundle;
 			};
@@ -305,7 +305,7 @@
 				INFOPLIST_FILE = Info.plist;
 				INSTALL_PATH = "$(HOME)/Library/Bundles";
 				OC_APPLICATION_REV_DOMAIN = com.owncloud.desktopclient;
-				OC_TEAM_IDENTIFIER_PREFIX = "";
+				OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX = "";
 				PRODUCT_NAME = SyncStateFinder;
 				WRAPPER_EXTENSION = bundle;
 			};
diff --git a/shell_integration/MacOSX/OwnCloudFinderSync/FinderSyncExt/FinderSync.m b/shell_integration/MacOSX/OwnCloudFinderSync/FinderSyncExt/FinderSync.m
index 689cf75..6273b50 100644
--- a/shell_integration/MacOSX/OwnCloudFinderSync/FinderSyncExt/FinderSync.m
+++ b/shell_integration/MacOSX/OwnCloudFinderSync/FinderSyncExt/FinderSync.m
@@ -59,7 +59,6 @@
 
 	_syncClientProxy = [[SyncClientProxy alloc] initWithDelegate:self serverName:serverName];
 	_registeredDirectories = [[NSMutableSet alloc] init];
-	_requestedUrls = [[NSMutableSet alloc] init];
 	_shareMenuTitle = nil;
 	
 	[_syncClientProxy start];
@@ -68,23 +67,8 @@
 
 #pragma mark - Primary Finder Sync protocol methods
 
-- (void)endObservingDirectoryAtURL:(NSURL *)url
-{
-	// The user is no longer seeing the container's contents.
-	// At this point we know that the status of any file as a direct child of url.filePathURL
-	// won't be displayed. Filter our _requestedUrls to get rid of them.
-	NSString *observedDirectoryPath = [url.filePathURL path];
-	[_requestedUrls filterUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) {
-		NSURL *requestedUrl = (NSURL *)evaluatedObject;
-		NSString *parentDir = [[requestedUrl path] stringByDeletingLastPathComponent];
-		return [parentDir isEqualToString:observedDirectoryPath];
-	}]];
-}
-
 - (void)requestBadgeIdentifierForURL:(NSURL *)url
 {
-	[_requestedUrls addObject:url.filePathURL];
-	
 	BOOL isDir;
 	if ([[NSFileManager defaultManager] fileExistsAtPath:[url path] isDirectory: &isDir] == NO) {
 		NSLog(@"ERROR: Could not determine file type of %@", [url path]);
@@ -128,14 +112,6 @@
 
 - (void)reFetchFileNameCacheForPath:(NSString*)path
 {
-	// This shouldn't be necessary, and will be a problem when we
-	// filter values of _requestedUrls even though Finder might still
-	// have an old status in its cache (and therefore won't re-request it)
-	// but will do OK until we get the socket API to re-push the status of everything needed.
-	[_requestedUrls enumerateObjectsUsingBlock: ^(id url, BOOL *stop) {
-		if ([[url path] hasPrefix:path])
-			[self requestBadgeIdentifierForURL: url];
-	}];
 }
 
 - (void)registerPath:(NSString*)path
diff --git a/shell_integration/MacOSX/OwnCloudFinderSync/OwnCloudFinderSync.xcodeproj/project.pbxproj b/shell_integration/MacOSX/OwnCloudFinderSync/OwnCloudFinderSync.xcodeproj/project.pbxproj
index 7092986..2418b3c 100644
--- a/shell_integration/MacOSX/OwnCloudFinderSync/OwnCloudFinderSync.xcodeproj/project.pbxproj
+++ b/shell_integration/MacOSX/OwnCloudFinderSync/OwnCloudFinderSync.xcodeproj/project.pbxproj
@@ -429,7 +429,7 @@
 				MTL_ENABLE_DEBUG_INFO = YES;
 				OC_APPLICATION_NAME = ownCloud;
 				OC_APPLICATION_REV_DOMAIN = com.owncloud.desktopclient;
-				OC_TEAM_IDENTIFIER_PREFIX = "";
+				OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX = "";
 				ONLY_ACTIVE_ARCH = YES;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE = "";
@@ -476,7 +476,7 @@
 				MTL_ENABLE_DEBUG_INFO = NO;
 				OC_APPLICATION_NAME = ownCloud;
 				OC_APPLICATION_REV_DOMAIN = com.owncloud.desktopclient;
-				OC_TEAM_IDENTIFIER_PREFIX = "";
+				OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX = "";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE = "";
 				SDKROOT = macosx;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list