From 9ba2725ab1e1a0bf4ef5f6a634bbd9d9f5d11181 Mon Sep 17 00:00:00 2001 From: Gabriel Burca Date: Tue, 10 Feb 2015 23:14:02 -0600 Subject: [PATCH] Fixes issue 6703 - onPrepareActionMode must be called before computeBatchDirection because computeBatchDirection ends up referencing mMarkAsRead / mMarkAsUnread and mFlag / mUnflag which could be null otherwise. --- .../main/java/com/fsck/k9/fragment/MessageListFragment.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java b/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java index c14c4fc96..2d671724d 100644 --- a/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java +++ b/k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java @@ -2285,12 +2285,12 @@ public class MessageListFragment extends Fragment implements OnItemClickListener mSelectedCount += selectedCountDelta; } - computeBatchDirection(); - updateActionModeTitle(); - // make sure the onPrepareActionMode is called mActionMode.invalidate(); + computeBatchDirection(); + updateActionModeTitle(); + computeSelectAllVisibility(); mAdapter.notifyDataSetChanged();