mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-26 09:38:52 -05:00
minor refactoring to cut down on repeated method calls
This commit is contained in:
parent
ce44165634
commit
c8bd377e76
@ -439,14 +439,16 @@ public class MessageList
|
||||
{
|
||||
super.onResume();
|
||||
|
||||
sortType = MessagingController.getInstance(getApplication()).getSortType();
|
||||
sortAscending = MessagingController.getInstance(getApplication()).isSortAscending(sortType);
|
||||
sortDateAscending = MessagingController.getInstance(getApplication()).isSortAscending(SORT_TYPE.SORT_DATE);
|
||||
MessagingController controller = MessagingController.getInstance(getApplication());
|
||||
|
||||
MessagingController.getInstance(getApplication()).addListener(mAdapter.mListener);
|
||||
sortType = controller.getSortType();
|
||||
sortAscending = controller.isSortAscending(sortType);
|
||||
sortDateAscending = controller.isSortAscending(SORT_TYPE.SORT_DATE);
|
||||
|
||||
controller.addListener(mAdapter.mListener);
|
||||
mAdapter.messages.clear();
|
||||
mAdapter.notifyDataSetChanged();
|
||||
MessagingController.getInstance(getApplication()).listLocalMessages(mAccount, mFolderName, mAdapter.mListener);
|
||||
controller.listLocalMessages(mAccount, mFolderName, mAdapter.mListener);
|
||||
|
||||
NotificationManager notifMgr = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
notifMgr.cancel(mAccount.getAccountNumber());
|
||||
|
Loading…
Reference in New Issue
Block a user