1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

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

View File

@ -217,14 +217,22 @@ public class WebDavStore extends Store {
for (int i = 0; i < urlLength; i++) { for (int i = 0; i < urlLength; i++) {
String[] urlParts = folderUrls[i].split("/"); String[] urlParts = folderUrls[i].split("/");
String folderName = urlParts[urlParts.length - 1]; String folderName = urlParts[urlParts.length - 1];
String fullUrl = ""; String fullPathName = "";
WebDavFolder wdFolder; WebDavFolder wdFolder;
if (folderName.equalsIgnoreCase(k9.INBOX)) { if (folderName.equalsIgnoreCase(k9.INBOX)) {
folderName = "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 = new WebDavFolder(folderName);
wdFolder.setUrl(folderUrls[i]); wdFolder.setUrl(folderUrls[i]);
folderList.add(wdFolder); folderList.add(wdFolder);