Merge remote-tracking branch 'remotes/upstream/descendIntoFolder' into beta
authortobiasKaminsky <tobias@kaminsky.me>
Fri, 13 Nov 2015 16:41:49 +0000 (17:41 +0100)
committertobiasKaminsky <tobias@kaminsky.me>
Fri, 13 Nov 2015 16:41:49 +0000 (17:41 +0100)
1  2 
src/com/owncloud/android/ui/activity/Uploader.java

@@@ -333,7 -333,8 +333,7 @@@ public class Uploader extends FileActiv
      public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
          // click on folder in the list
          Log_OC.d(TAG, "on item click");
 -        // TODO Enable when "On Device" is recovered ?
 -        Vector<OCFile> tmpfiles = getStorageManager().getFolderContent(mFile /*, false*/);
 +        Vector<OCFile> tmpfiles = getStorageManager().getFolderContent(mFile, false);
          if (tmpfiles.size() <= 0) return;
          // filter on dirtype
          Vector<OCFile> files = new Vector<OCFile>();
  
          mFile = getStorageManager().getFileByPath(full_path);
          if (mFile != null) {
 -            // TODO Enable when "On Device" is recovered ?
 -            Vector<OCFile> files = getStorageManager().getFolderContent(mFile/*, false*/);
 +            Vector<OCFile> files = getStorageManager().getFolderContent(mFile, false);
              List<HashMap<String, Object>> data = new LinkedList<HashMap<String,Object>>();
              for (OCFile f : files) {
                  HashMap<String, Object> h = new HashMap<String, Object>();
      private void onCreateFolderOperationFinish(CreateFolderOperation operation,
                                                 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();
              try {
                  Toast msg = Toast.makeText(this, 
                          ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()), 
      public boolean onCreateOptionsMenu(Menu menu) {
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.main_menu, menu);
 -        menu.findItem(R.id.action_upload).setVisible(false);
          menu.findItem(R.id.action_sort).setVisible(false);
          menu.findItem(R.id.action_sync_account).setVisible(false);
          return true;