1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-15 14:05:05 -05:00

Fixes Issue 844

Definitely, some optimizations could be made

Also, reliably display the folder name at the top of the MessageList
Activity
This commit is contained in:
Daniel Applebaum 2009-12-04 19:13:29 +00:00
parent 2c7853c539
commit 514b4cf121

View File

@ -462,12 +462,6 @@ public class MessageList
onRestoreListState(savedInstanceState); onRestoreListState(savedInstanceState);
} }
setTitle(
mAccount.getDescription()
+ " - " +
mCurrentFolder.displayName
);
} }
private void onRestoreListState(Bundle savedInstanceState) private void onRestoreListState(Bundle savedInstanceState)
@ -514,13 +508,21 @@ public class MessageList
sortDateAscending = MessagingController.getInstance(getApplication()).isSortAscending(SORT_TYPE.SORT_DATE); sortDateAscending = MessagingController.getInstance(getApplication()).isSortAscending(SORT_TYPE.SORT_DATE);
MessagingController.getInstance(getApplication()).addListener(mAdapter.mListener); MessagingController.getInstance(getApplication()).addListener(mAdapter.mListener);
mAdapter.messages.clear();
mAdapter.notifyDataSetChanged();
MessagingController.getInstance(getApplication()).listLocalMessages(mAccount, mFolderName, mAdapter.mListener); MessagingController.getInstance(getApplication()).listLocalMessages(mAccount, mFolderName, mAdapter.mListener);
NotificationManager notifMgr = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); NotificationManager notifMgr = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notifMgr.cancel(mAccount.getAccountNumber()); notifMgr.cancel(mAccount.getAccountNumber());
notifMgr.cancel(-1000 - mAccount.getAccountNumber()); notifMgr.cancel(-1000 - mAccount.getAccountNumber());
setTitle(
mAccount.getDescription()
+ " - " +
mCurrentFolder.displayName
);
} }
@Override @Override