mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
clean up some weird inverted logic (as recommended by intellij)
This commit is contained in:
parent
c541a07ed2
commit
b1fb92034a
@ -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);
|
||||||
|
@ -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();
|
||||||
|
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user