1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-10 09:26:19 +00:00

Removed constrain to parse only public shares

This commit is contained in:
David A. Velasco 2015-10-15 09:24:06 +02:00
parent cea7054a3d
commit d9eb3655fd
2 changed files with 5 additions and 5 deletions

View File

@ -117,8 +117,10 @@ public class GetRemoteSharesForFileOperation extends RemoteOperation {
ArrayList<Object> sharesObjects = new ArrayList<Object>();
for (OCShare share: mShares) {
// Build the link
if (( share.getShareLink() == null) &&
(share.getToken().length() > 0)) {
if ( share.getShareType() == ShareType.PUBLIC_LINK &&
share.getShareLink() == null &&
share.getToken().length() > 0
) {
String linkToken = ShareUtils.getSharingToken(
client.getOwnCloudVersion());
share.setShareLink(client.getBaseUri() + linkToken +

View File

@ -348,9 +348,7 @@ public class ShareXMLParser {
}
private boolean isValidShare(OCShare share) {
return ((share.getIdRemoteShared() > -1) &&
(share.getShareType() == ShareType.PUBLIC_LINK) // at this moment we only care about public shares
);
return (share.getIdRemoteShared() > -1);
}
private void fixPathForFolder(OCShare share) {