mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-20 04:31:47 -05:00
Extract "disable buttons" on messageview and disable buttons before
shifting to the next message
This commit is contained in:
parent
0a848d6526
commit
00199de3bb
@ -918,12 +918,7 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
// If moving isn't support at all, then all of them must be disabled anyway.
|
// If moving isn't support at all, then all of them must be disabled anyway.
|
||||||
if (MessagingController.getInstance(getApplication()).isMoveCapable(mAccount) == false)
|
if (MessagingController.getInstance(getApplication()).isMoveCapable(mAccount) == false)
|
||||||
{
|
{
|
||||||
mArchive.setEnabled(false);
|
disableButtons();
|
||||||
mMove.setEnabled(false);
|
|
||||||
mSpam.setEnabled(false);
|
|
||||||
mArchiveScrolling.setEnabled(false);
|
|
||||||
mMoveScrolling.setEnabled(false);
|
|
||||||
mSpamScrolling.setEnabled(false);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -989,6 +984,17 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void disableButtons()
|
||||||
|
{
|
||||||
|
mArchive.setEnabled(false);
|
||||||
|
mMove.setEnabled(false);
|
||||||
|
mSpam.setEnabled(false);
|
||||||
|
mArchiveScrolling.setEnabled(false);
|
||||||
|
mMoveScrolling.setEnabled(false);
|
||||||
|
mSpamScrolling.setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
private void setOnClickListener(int viewCode)
|
private void setOnClickListener(int viewCode)
|
||||||
{
|
{
|
||||||
View thisView = findViewById(viewCode);
|
View thisView = findViewById(viewCode);
|
||||||
@ -1333,10 +1339,15 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mLastDirection = NEXT;
|
mLastDirection = NEXT;
|
||||||
|
|
||||||
|
disableButtons();
|
||||||
|
|
||||||
if (animate)
|
if (animate)
|
||||||
{
|
{
|
||||||
mTopView.startAnimation(outToLeftAnimation());
|
mTopView.startAnimation(outToLeftAnimation());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
displayMessage(mNextMessage);
|
displayMessage(mNextMessage);
|
||||||
next.requestFocus();
|
next.requestFocus();
|
||||||
}
|
}
|
||||||
@ -1351,6 +1362,9 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
mLastDirection = PREVIOUS;
|
mLastDirection = PREVIOUS;
|
||||||
|
|
||||||
|
disableButtons();
|
||||||
|
|
||||||
if (animate)
|
if (animate)
|
||||||
{
|
{
|
||||||
mTopView.startAnimation(inFromRightAnimation());
|
mTopView.startAnimation(inFromRightAnimation());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user