Set or clear password to protect public link in ShareFileFragment
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / dialog / SharePasswordDialogFragment.java
index d069b5a..9fbdbc4 100644 (file)
@@ -113,8 +113,14 @@ public class SharePasswordDialogFragment extends DialogFragment
             }
 
             // Share the file
-            ((FileActivity)getActivity()).getFileOperationsHelper()
-                                    .shareFileWithLinkToApp(mFile, password, mSendIntent);
+            if (mSendIntent == null) {
+                ((FileActivity) getActivity()).getFileOperationsHelper().
+                        setPasswordToShareViaLink(mFile, password);
+
+            } else {    // TODO remove old flow
+                ((FileActivity) getActivity()).getFileOperationsHelper()
+                        .shareFileWithLinkToApp(mFile, password, mSendIntent);
+            }
 
         } else {
             // Disable the flag "Share again"