import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
+import android.widget.Toast;
import com.owncloud.android.R;
+import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.datamodel.ThumbnailsCacheManager;
import com.owncloud.android.lib.common.utils.Log_OC;
addUserGroupButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
- // Show Search Fragment
- mListener.showSearchUsersAndGroups(mShares);
+ boolean shareWithUsersEnable = AccountUtils.hasSearchUsersSupport(mAccount);
+ if (shareWithUsersEnable) {
+ // Show Search Fragment
+ mListener.showSearchUsersAndGroups(mShares);
+ } else {
+ String message = getString(R.string.share_sharee_unavailable);
+ Toast.makeText(getActivity(), message, Toast.LENGTH_LONG).show();
+ }
}
});