diff --git a/src/com/owncloud/android/files/FileOperationsHelper.java b/src/com/owncloud/android/files/FileOperationsHelper.java index 41e7110b63..2c42537aae 100644 --- a/src/com/owncloud/android/files/FileOperationsHelper.java +++ b/src/com/owncloud/android/files/FileOperationsHelper.java @@ -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, diff --git a/src/com/owncloud/android/ui/fragment/FileDetailFragment.java b/src/com/owncloud/android/ui/fragment/FileDetailFragment.java index acc5d63e21..216cceecf5 100644 --- a/src/com/owncloud/android/ui/fragment/FileDetailFragment.java +++ b/src/com/owncloud/android/ui/fragment/FileDetailFragment.java @@ -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; } diff --git a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java index d96739bdf5..96aa2dc2c3 100644 --- a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -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; }