diff --git a/src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java b/src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java index 0eeae615bd..29118d1338 100644 --- a/src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java +++ b/src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java @@ -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)) {