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:
parent
74ab6cf154
commit
2589471e98
1 changed files with 9 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue