mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +00:00 
			
		
		
		
	Removed constrain to parse only public shares
This commit is contained in:
		
							parent
							
								
									cea7054a3d
								
							
						
					
					
						commit
						d9eb3655fd
					
				| @ -117,8 +117,10 @@ public class GetRemoteSharesForFileOperation extends RemoteOperation { | |||||||
| 					ArrayList<Object> sharesObjects = new ArrayList<Object>(); | 					ArrayList<Object> sharesObjects = new ArrayList<Object>(); | ||||||
| 					for (OCShare share: mShares) { | 					for (OCShare share: mShares) { | ||||||
| 						// Build the link | 						// Build the link | ||||||
| 						if (( share.getShareLink() == null) && | 						if (	share.getShareType() == ShareType.PUBLIC_LINK && | ||||||
| 								(share.getToken().length() > 0)) { | 								share.getShareLink() == null && | ||||||
|  | 								share.getToken().length() > 0 | ||||||
|  | 								) { | ||||||
| 							String linkToken = ShareUtils.getSharingToken( | 							String linkToken = ShareUtils.getSharingToken( | ||||||
| 									client.getOwnCloudVersion()); | 									client.getOwnCloudVersion()); | ||||||
| 							share.setShareLink(client.getBaseUri() + linkToken + | 							share.setShareLink(client.getBaseUri() + linkToken + | ||||||
|  | |||||||
| @ -348,9 +348,7 @@ public class ShareXMLParser { | |||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	private boolean isValidShare(OCShare share) { | 	private boolean isValidShare(OCShare share) { | ||||||
| 		return ((share.getIdRemoteShared() > -1) && | 		return (share.getIdRemoteShared() > -1); | ||||||
| 				(share.getShareType() == ShareType.PUBLIC_LINK)	// at this moment we only care about public shares |  | ||||||
| 				); |  | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	private void fixPathForFolder(OCShare share) { | 	private void fixPathForFolder(OCShare share) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user