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.

This commit is contained in:
Matthew Brace 2008-12-16 02:06:39 +00:00
parent dfa11df41b
commit b877a52b01
1 changed files with 10 additions and 2 deletions

View File

@ -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);