1
0
Fork 0
mirror of https://github.com/nextcloud/android.git synced 2024-12-22 08:44:34 +03:00

show share type

This commit is contained in:
tobiasKaminsky 2017-05-05 16:00:46 +02:00
parent 74ab6cf154
commit 2589471e98
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -57,6 +57,7 @@ import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.files.ReadRemoteFileOperation;
import com.owncloud.android.lib.resources.files.RemoteFile;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.services.OperationsService.OperationsServiceBinder;
import com.owncloud.android.ui.activity.ComponentsGetter;
import com.owncloud.android.ui.fragment.ExtendedListFragment;
@ -533,6 +534,14 @@ public class FileListListAdapter extends BaseAdapter {
if (result.isSuccess()) {
OCFile file = FileStorageUtils.fillOCFile((RemoteFile) result.getData().get(0));
ShareType newShareType = ocShare.getShareType();
if (newShareType == ShareType.PUBLIC_LINK) {
file.setShareViaLink(true);
} else if (newShareType == ShareType.USER || newShareType == ShareType.GROUP ||
newShareType == ShareType.EMAIL || newShareType == ShareType.FEDERATED) {
file.setShareWithSharee(true);
}
mStorageManager.saveFile(file);
if (!mFiles.contains(file)) {