From 514b4cf121d3b0031ee482864320969e1df5fff2 Mon Sep 17 00:00:00 2001 From: Daniel Applebaum Date: Fri, 4 Dec 2009 19:13:29 +0000 Subject: [PATCH] Fixes Issue 844 Definitely, some optimizations could be made Also, reliably display the folder name at the top of the MessageList Activity --- src/com/android/email/activity/MessageList.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/com/android/email/activity/MessageList.java b/src/com/android/email/activity/MessageList.java index 4e4b77d52..d561aee39 100644 --- a/src/com/android/email/activity/MessageList.java +++ b/src/com/android/email/activity/MessageList.java @@ -462,12 +462,6 @@ public class MessageList onRestoreListState(savedInstanceState); } - setTitle( - mAccount.getDescription() - + " - " + - mCurrentFolder.displayName - - ); } private void onRestoreListState(Bundle savedInstanceState) @@ -514,13 +508,21 @@ public class MessageList sortDateAscending = MessagingController.getInstance(getApplication()).isSortAscending(SORT_TYPE.SORT_DATE); MessagingController.getInstance(getApplication()).addListener(mAdapter.mListener); - + mAdapter.messages.clear(); + mAdapter.notifyDataSetChanged(); MessagingController.getInstance(getApplication()).listLocalMessages(mAccount, mFolderName, mAdapter.mListener); NotificationManager notifMgr = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); notifMgr.cancel(mAccount.getAccountNumber()); notifMgr.cancel(-1000 - mAccount.getAccountNumber()); + setTitle( + mAccount.getDescription() + + " - " + + mCurrentFolder.displayName + + ); + } @Override