1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

clean up some weird inverted logic (as recommended by intellij)

This commit is contained in:
Jesse Vincent 2010-07-27 01:27:54 +00:00
parent c541a07ed2
commit b1fb92034a
3 changed files with 18 additions and 18 deletions

View File

@ -558,13 +558,13 @@ public class Account implements BaseAccount
// Always get stats about the INBOX (see issue 1817) // Always get stats about the INBOX (see issue 1817)
if (folder.getName().equals(K9.INBOX) || ( if (folder.getName().equals(K9.INBOX) || (
folder.getName().equals(getTrashFolderName()) == false && !folder.getName().equals(getTrashFolderName()) &&
folder.getName().equals(getDraftsFolderName()) == false && !folder.getName().equals(getDraftsFolderName()) &&
folder.getName().equals(getArchiveFolderName()) == false && !folder.getName().equals(getArchiveFolderName()) &&
folder.getName().equals(getSpamFolderName()) == false && !folder.getName().equals(getSpamFolderName()) &&
folder.getName().equals(getOutboxFolderName()) == false && !folder.getName().equals(getOutboxFolderName()) &&
folder.getName().equals(getSentFolderName()) == false && !folder.getName().equals(getSentFolderName()) &&
folder.getName().equals(getErrorFolderName()) == false)) !folder.getName().equals(getErrorFolderName())))
{ {
if (aMode == Account.FolderMode.NONE) if (aMode == Account.FolderMode.NONE)
{ {
@ -1353,7 +1353,7 @@ public class Account implements BaseAccount
public Date getEarliestPollDate() public Date getEarliestPollDate()
{ {
int age = getMaximumPolledMessageAge(); int age = getMaximumPolledMessageAge();
if (age < 0 == false) if (age >= 0)
{ {
Calendar now = Calendar.getInstance(); Calendar now = Calendar.getInstance();
now.set(Calendar.HOUR_OF_DAY, 0); now.set(Calendar.HOUR_OF_DAY, 0);

View File

@ -1135,11 +1135,11 @@ public class MessageView extends K9Activity implements OnClickListener
private void onArchive() private void onArchive()
{ {
if (MessagingController.getInstance(getApplication()).isMoveCapable(mAccount) == false) if (!MessagingController.getInstance(getApplication()).isMoveCapable(mAccount))
{ {
return; return;
} }
if (MessagingController.getInstance(getApplication()).isMoveCapable(mMessage) == false) if (!MessagingController.getInstance(getApplication()).isMoveCapable(mMessage))
{ {
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show(); toast.show();
@ -1160,11 +1160,11 @@ public class MessageView extends K9Activity implements OnClickListener
private void onSpam() private void onSpam()
{ {
if (MessagingController.getInstance(getApplication()).isMoveCapable(mAccount) == false) if (!MessagingController.getInstance(getApplication()).isMoveCapable(mAccount))
{ {
return; return;
} }
if (MessagingController.getInstance(getApplication()).isMoveCapable(mMessage) == false) if (!MessagingController.getInstance(getApplication()).isMoveCapable(mMessage))
{ {
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show(); toast.show();
@ -1293,12 +1293,12 @@ public class MessageView extends K9Activity implements OnClickListener
private void onMove() private void onMove()
{ {
if ((MessagingController.getInstance(getApplication()).isMoveCapable(mAccount) == false) if ((!MessagingController.getInstance(getApplication()).isMoveCapable(mAccount))
|| (mMessage == null)) || (mMessage == null))
{ {
return; return;
} }
if (MessagingController.getInstance(getApplication()).isMoveCapable(mMessage) == false) if (!MessagingController.getInstance(getApplication()).isMoveCapable(mMessage))
{ {
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show(); toast.show();
@ -1314,12 +1314,12 @@ public class MessageView extends K9Activity implements OnClickListener
private void onCopy() private void onCopy()
{ {
if ((MessagingController.getInstance(getApplication()).isCopyCapable(mAccount) == false) if ((!MessagingController.getInstance(getApplication()).isCopyCapable(mAccount))
|| (mMessage == null)) || (mMessage == null))
{ {
return; return;
} }
if (MessagingController.getInstance(getApplication()).isCopyCapable(mMessage) == false) if (!MessagingController.getInstance(getApplication()).isCopyCapable(mMessage))
{ {
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show(); toast.show();

View File

@ -3921,11 +3921,11 @@ public class MessagingController implements Runnable
else else
{ {
localTrashFolder = localStore.getFolder(account.getTrashFolderName()); localTrashFolder = localStore.getFolder(account.getTrashFolderName());
if (localTrashFolder.exists() == false) if (!localTrashFolder.exists())
{ {
localTrashFolder.create(Folder.FolderType.HOLDS_MESSAGES); localTrashFolder.create(Folder.FolderType.HOLDS_MESSAGES);
} }
if (localTrashFolder.exists() == true) if (localTrashFolder.exists())
{ {
if (K9.DEBUG) if (K9.DEBUG)
Log.d(K9.LOG_TAG, "Deleting messages in normal folder, moving"); Log.d(K9.LOG_TAG, "Deleting messages in normal folder, moving");