mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-07 18:50:11 -05:00
cut down a couple overly verbose conditionals
This commit is contained in:
parent
daf5a9d704
commit
877427f110
@ -997,55 +997,31 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (K9.DEBUG)
|
if (K9.DEBUG)
|
||||||
Log.d(K9.LOG_TAG, "MessageView got message " + mMessageReference);
|
Log.d(K9.LOG_TAG, "MessageView got message " + mMessageReference);
|
||||||
|
if (intent.getBooleanExtra(EXTRA_NEXT, false))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
boolean goNext = intent.getBooleanExtra(EXTRA_NEXT, false);
|
|
||||||
if (goNext)
|
|
||||||
{
|
{
|
||||||
next.requestFocus();
|
next.requestFocus();
|
||||||
}
|
}
|
||||||
// Perhaps the ScrollButtons should be global, instead of account-specific
|
// Perhaps the ScrollButtons should be global, instead of account-specific
|
||||||
mAccount = Preferences.getPreferences(this).getAccount(mMessageReference.accountUuid);
|
mAccount = Preferences.getPreferences(this).getAccount(mMessageReference.accountUuid);
|
||||||
Account.ScrollButtons scrollButtons = mAccount.getScrollMessageViewButtons();
|
Account.ScrollButtons scrollButtons = mAccount.getScrollMessageViewButtons();
|
||||||
|
if
|
||||||
//MessagingController.getInstance(getApplication()).addListener(mListener);
|
((Account.ScrollButtons.ALWAYS == scrollButtons)
|
||||||
if (Account.ScrollButtons.ALWAYS == scrollButtons)
|
||
|
||||||
|
(Account.ScrollButtons.KEYBOARD_AVAILABLE == scrollButtons &&
|
||||||
|
(this.getResources().getConfiguration().hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO)))
|
||||||
{
|
{
|
||||||
scrollButtons();
|
scrollButtons();
|
||||||
}
|
}
|
||||||
else if (Account.ScrollButtons.NEVER == scrollButtons)
|
else // never or the keyboard is open
|
||||||
{
|
{
|
||||||
staticButtons();
|
staticButtons();
|
||||||
}
|
}
|
||||||
else // Account.ScrollButtons.KEYBOARD_AVAIL
|
|
||||||
{
|
|
||||||
if (this.getResources().getConfiguration().hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO)
|
|
||||||
{
|
|
||||||
scrollButtons();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
staticButtons();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Account.ScrollButtons scrollMoveButtons = mAccount.getScrollMessageViewMoveButtons();
|
Account.ScrollButtons scrollMoveButtons = mAccount.getScrollMessageViewMoveButtons();
|
||||||
if (Account.ScrollButtons.ALWAYS == scrollMoveButtons)
|
if ((Account.ScrollButtons.ALWAYS == scrollMoveButtons)
|
||||||
{
|
|| (Account.ScrollButtons.KEYBOARD_AVAILABLE == scrollMoveButtons &&
|
||||||
scrollMoveButtons();
|
(this.getResources().getConfiguration().hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO)))
|
||||||
}
|
|
||||||
else if (Account.ScrollButtons.NEVER == scrollMoveButtons)
|
|
||||||
{
|
|
||||||
staticMoveButtons();
|
|
||||||
}
|
|
||||||
else // Account.ScrollButtons.KEYBOARD_AVAIL
|
|
||||||
{
|
|
||||||
if (this.getResources().getConfiguration().hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO)
|
|
||||||
{
|
{
|
||||||
scrollMoveButtons();
|
scrollMoveButtons();
|
||||||
}
|
}
|
||||||
@ -1053,8 +1029,6 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
{
|
{
|
||||||
staticMoveButtons();
|
staticMoveButtons();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!mAccount.getEnableMoveButtons())
|
if (!mAccount.getEnableMoveButtons())
|
||||||
{
|
{
|
||||||
View buttons = findViewById(R.id.move_buttons);
|
View buttons = findViewById(R.id.move_buttons);
|
||||||
|
Loading…
Reference in New Issue
Block a user