mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
remove a special flag in FolderInfoHolder that we only use twice and
appear to initialize unreliably in favor of some simple checks.
This commit is contained in:
parent
27d3e6312b
commit
3779237eb8
@ -22,11 +22,6 @@ public class FolderInfoHolder implements Comparable<FolderInfoHolder>
|
||||
public Folder folder;
|
||||
public boolean pushActive;
|
||||
|
||||
/**
|
||||
* Outbox is handled differently from any other folder.
|
||||
*/
|
||||
public boolean outbox;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
@ -133,7 +128,6 @@ public class FolderInfoHolder implements Comparable<FolderInfoHolder>
|
||||
if (this.name.equals(account.getOutboxFolderName()))
|
||||
{
|
||||
this.displayName = String.format(context.getString(R.string.special_mailbox_name_outbox_fmt), this.name);
|
||||
this.outbox = true;
|
||||
}
|
||||
|
||||
if (this.name.equals(account.getDraftsFolderName()))
|
||||
|
@ -766,7 +766,7 @@ public class FolderList extends K9ListActivity
|
||||
if (!folder.name.equals(mAccount.getTrashFolderName()))
|
||||
menu.findItem(R.id.empty_trash).setVisible(false);
|
||||
|
||||
if (folder.outbox)
|
||||
if (folder.name.equals(mAccount.getOutboxFolderName()))
|
||||
{
|
||||
menu.findItem(R.id.check_mail).setVisible(false);
|
||||
}
|
||||
|
@ -1750,7 +1750,7 @@ public class MessageList
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mCurrentFolder != null && mCurrentFolder.outbox)
|
||||
if (mCurrentFolder != null && mCurrentFolder.name.equals(mAccount.getOutboxFolderName()))
|
||||
{
|
||||
menu.findItem(R.id.check_mail).setVisible(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user