mirror of
https://github.com/thunderbird/thunderbird-android.git
synced 2024-09-19 19:52:14 +02:00
Merged from:
1722 | danapple0 | 2010-05-22 12:34:16 -0500 (Sat, 22 May 2010) | 3 lines Changed paths: M /k9mail/trunk/src/com/fsck/k9/mail/store/ImapStore.java Make sure prefix is fetched before any call to getCombinedPrefix.
This commit is contained in:
parent
a3238417e7
commit
7a0eab967e
@ -454,11 +454,39 @@ public class ImapStore extends Store
|
||||
this.mName = name;
|
||||
}
|
||||
|
||||
public String getPrefixedName()
|
||||
public String getPrefixedName() throws MessagingException
|
||||
{
|
||||
String prefixedName = "";
|
||||
if (!K9.INBOX.equalsIgnoreCase(mName))
|
||||
{
|
||||
ImapConnection connection = null;
|
||||
synchronized (this)
|
||||
{
|
||||
if (mConnection == null)
|
||||
{
|
||||
connection = getConnection();
|
||||
}
|
||||
else
|
||||
{
|
||||
connection = mConnection;
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
|
||||
connection.open();
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
throw new MessagingException("Unable to get IMAP prefix", ioe);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (mConnection == null)
|
||||
{
|
||||
releaseConnection(connection);
|
||||
}
|
||||
}
|
||||
prefixedName = getCombinedPrefix();
|
||||
}
|
||||
|
||||
@ -1764,7 +1792,7 @@ public class ImapStore extends Store
|
||||
{
|
||||
if (o instanceof ImapFolder)
|
||||
{
|
||||
return ((ImapFolder)o).getPrefixedName().equals(getPrefixedName());
|
||||
return ((ImapFolder)o).getName().equalsIgnoreCase(getName());
|
||||
}
|
||||
return super.equals(o);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user