Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b877a52b authored by Matthew Brace's avatar Matthew Brace
Browse files

Update for folders to display the "path" that the folder resides in (ie,...

Update for folders to display the "path" that the folder resides in (ie, Inbox/Work/To Me) rather than just the name of the folder.  Allows an easier understanding of the hierarchy until true folder trees can be implemented.

parent dfa11df4
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -217,14 +217,22 @@ public class WebDavStore extends Store {
                    for (int i = 0; i < urlLength; i++) {
                        String[] urlParts = folderUrls[i].split("/");
                        String folderName = urlParts[urlParts.length - 1];
                        String fullUrl = "";
                        String fullPathName = "";
                        WebDavFolder wdFolder;
                        
                        if (folderName.equalsIgnoreCase(k9.INBOX)) {
                            folderName = "INBOX";
                        } else {
                            for (int j = 5, count = urlParts.length; j < count; j++) {
                                if (j != 5) {
                                    fullPathName = fullPathName + "/" + urlParts[j];
                                } else {
                                    fullPathName = urlParts[j];
                                }
                            }
                            folderName = java.net.URLDecoder.decode(fullPathName, "UTF-8");
                        }

                        folderName = java.net.URLDecoder.decode(folderName, "UTF-8");
                        wdFolder = new WebDavFolder(folderName);
                        wdFolder.setUrl(folderUrls[i]);
                        folderList.add(wdFolder);