mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
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:
parent
173c810cc1
commit
046a566ed4
3 changed files with 2 additions and 2 deletions
|
@ -33,6 +33,7 @@ import com.owncloud.android.lib.network.webdav.WebdavUtils;
|
||||||
import com.owncloud.android.lib.operations.common.ShareType;
|
import com.owncloud.android.lib.operations.common.ShareType;
|
||||||
import com.owncloud.android.operations.CreateShareOperation;
|
import com.owncloud.android.operations.CreateShareOperation;
|
||||||
import com.owncloud.android.ui.activity.FileActivity;
|
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.ui.dialog.ActivityChooserDialog;
|
||||||
import com.owncloud.android.utils.Log_OC;
|
import com.owncloud.android.utils.Log_OC;
|
||||||
|
|
||||||
|
@ -107,6 +108,7 @@ public class FileOperationsHelper {
|
||||||
public void shareFileWithLinkToApp(OCFile file, Intent sendIntent, FileActivity callerActivity) {
|
public void shareFileWithLinkToApp(OCFile file, Intent sendIntent, FileActivity callerActivity) {
|
||||||
|
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
|
((FileDisplayActivity) callerActivity).showLoadingDialog();
|
||||||
CreateShareOperation createShare = new CreateShareOperation(file.getRemotePath(), ShareType.PUBLIC_LINK, "", false, "", 1, sendIntent);
|
CreateShareOperation createShare = new CreateShareOperation(file.getRemotePath(), ShareType.PUBLIC_LINK, "", false, "", 1, sendIntent);
|
||||||
createShare.execute(callerActivity.getStorageManager(),
|
createShare.execute(callerActivity.getStorageManager(),
|
||||||
callerActivity,
|
callerActivity,
|
||||||
|
|
|
@ -337,7 +337,6 @@ public class FileDetailFragment extends FileFragment implements
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.action_share_file: {
|
case R.id.action_share_file: {
|
||||||
FileDisplayActivity activity = (FileDisplayActivity) getSherlockActivity();
|
FileDisplayActivity activity = (FileDisplayActivity) getSherlockActivity();
|
||||||
activity.showLoadingDialog();
|
|
||||||
activity.getFileOperationsHelper().shareFileWithLink(getFile(), activity);
|
activity.getFileOperationsHelper().shareFileWithLink(getFile(), activity);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,7 +285,6 @@ public class OCFileListFragment extends ExtendedListFragment implements EditName
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.action_share_file: {
|
case R.id.action_share_file: {
|
||||||
FileDisplayActivity activity = (FileDisplayActivity) getSherlockActivity();
|
FileDisplayActivity activity = (FileDisplayActivity) getSherlockActivity();
|
||||||
activity.showLoadingDialog();
|
|
||||||
activity.getFileOperationsHelper().shareFileWithLink(mTargetFile, activity);
|
activity.getFileOperationsHelper().shareFileWithLink(mTargetFile, activity);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue