OC-2822: Loading progress dialog while share link is being created. Fix a problem when the app for sharing is not selected

This commit is contained in:
masensio 2014-02-05 10:18:46 +01:00
parent 173c810cc1
commit 046a566ed4
3 changed files with 2 additions and 2 deletions

View file

@ -33,6 +33,7 @@ import com.owncloud.android.lib.network.webdav.WebdavUtils;
import com.owncloud.android.lib.operations.common.ShareType;
import com.owncloud.android.operations.CreateShareOperation;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.dialog.ActivityChooserDialog;
import com.owncloud.android.utils.Log_OC;
@ -107,6 +108,7 @@ public class FileOperationsHelper {
public void shareFileWithLinkToApp(OCFile file, Intent sendIntent, FileActivity callerActivity) {
if (file != null) {
((FileDisplayActivity) callerActivity).showLoadingDialog();
CreateShareOperation createShare = new CreateShareOperation(file.getRemotePath(), ShareType.PUBLIC_LINK, "", false, "", 1, sendIntent);
createShare.execute(callerActivity.getStorageManager(),
callerActivity,

View file

@ -337,7 +337,6 @@ public class FileDetailFragment extends FileFragment implements
switch (item.getItemId()) {
case R.id.action_share_file: {
FileDisplayActivity activity = (FileDisplayActivity) getSherlockActivity();
activity.showLoadingDialog();
activity.getFileOperationsHelper().shareFileWithLink(getFile(), activity);
return true;
}

View file

@ -285,7 +285,6 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName
switch (item.getItemId()) {
case R.id.action_share_file: {
FileDisplayActivity activity = (FileDisplayActivity) getSherlockActivity();
activity.showLoadingDialog();
activity.getFileOperationsHelper().shareFileWithLink(mTargetFile, activity);
return true;
}