1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-13 06:38:05 -05:00

Fixes Issue 733

This commit is contained in:
Daniel Applebaum 2009-11-07 20:27:30 +00:00
parent 0baf9d6134
commit 22bfa74ddf

View File

@ -421,11 +421,19 @@ public class ImapStore extends Store {
// 2 OK [READ-WRITE] Select completed. // 2 OK [READ-WRITE] Select completed.
try { try {
if(mPathDelimeter == null){ if(mPathDelimeter == null)
{
List<ImapResponse> nameResponses = List<ImapResponse> nameResponses =
executeSimpleCommand(String.format("LIST \"\" \"*%s\"", encodeFolderName(mName))); executeSimpleCommand(String.format("LIST \"\" \"*%s\"", encodeFolderName(mName)));
if(nameResponses.size() > 0){ for (ImapResponse response : nameResponses) {
mPathDelimeter = nameResponses.get(0).getString(2); if (response.get(0).equals("LIST"))
{
mPathDelimeter = nameResponses.get(0).getString(2);
if (Email.DEBUG)
{
Log.d(Email.LOG_TAG, "Got path delimeter '" + mPathDelimeter + "'");
}
}
} }
} }
@ -942,6 +950,7 @@ public class ImapStore extends Store {
* @param response * @param response
*/ */
protected void handleUntaggedResponse(ImapResponse response) { protected void handleUntaggedResponse(ImapResponse response) {
//Log.i(Email.LOG_TAG, "Got response with size " + response.size() + ": " + response);
if (response.mTag == null && response.size() > 1) if (response.mTag == null && response.size() > 1)
{ {
if (response.get(1).equals("EXISTS")) { if (response.get(1).equals("EXISTS")) {
@ -984,6 +993,34 @@ public class ImapStore extends Store {
Log.d(Email.LOG_TAG, "Got untagged EXPUNGE with value " + mMessageCount); Log.d(Email.LOG_TAG, "Got untagged EXPUNGE with value " + mMessageCount);
} }
} }
// if (response.size() > 1) {
// Object bracketedObj = response.get(1);
// if (bracketedObj instanceof ImapList)
// {
// ImapList bracketed = (ImapList)bracketedObj;
//
// if (bracketed.size() > 0)
// {
// Object keyObj = bracketed.get(0);
// if (keyObj instanceof String)
// {
// String key = (String)keyObj;
// if ("ALERT".equals(key))
// {
// StringBuffer sb = new StringBuffer();
// for (int i = 2, count = response.size(); i < count; i++) {
// sb.append(response.get(i).toString());
// sb.append(' ');
// }
//
// Log.w(Email.LOG_TAG, "ALERT: " + sb.toString());
// }
// }
// }
//
//
// }
// }
} }
//Log.i(Email.LOG_TAG, "mMessageCount = " + mMessageCount); //Log.i(Email.LOG_TAG, "mMessageCount = " + mMessageCount);
} }