descend into folder after creating it in uploader
authortobiasKaminsky <tobias@kaminsky.me>
Wed, 1 Jul 2015 18:07:47 +0000 (20:07 +0200)
committertobiasKaminsky <tobias@kaminsky.me>
Wed, 1 Jul 2015 18:07:47 +0000 (20:07 +0200)
src/com/owncloud/android/operations/CreateFolderOperation.java
src/com/owncloud/android/ui/activity/Uploader.java

index b020b92..0b3343c 100644 (file)
@@ -121,4 +121,8 @@ public class CreateFolderOperation extends SyncOperation implements OnRemoteOper
             Log_OC.d(TAG, "Create directory " + mRemotePath + " in Database");
         }
     }
             Log_OC.d(TAG, "Create directory " + mRemotePath + " in Database");
         }
     }
+
+    public String getRemotePath() {
+        return mRemotePath;
+    }
 }
 }
index 533bb99..54aac4d 100644 (file)
@@ -602,6 +602,9 @@ public class Uploader extends FileActivity
                                                RemoteOperationResult result) {
         if (result.isSuccess()) {
             dismissLoadingDialog();
                                                RemoteOperationResult result) {
         if (result.isSuccess()) {
             dismissLoadingDialog();
+            String remotePath = operation.getRemotePath().substring(0, operation.getRemotePath().length() -1);
+            String newFolder = remotePath.substring(remotePath.lastIndexOf("/") + 1);
+            mParents.push(newFolder);
             populateDirectoryList();
         } else {
             dismissLoadingDialog();
             populateDirectoryList();
         } else {
             dismissLoadingDialog();