1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 19:52:17 -05:00

Fixed 1597

Switching "Touch-friendly view" option from message list view no longer causes NullPointerException / Force close
This commit is contained in:
Jesse Vincent 2010-06-09 02:45:28 +00:00
parent 53f8937bc3
commit 504f1b7e17

View File

@ -417,6 +417,12 @@ public class MessageList
public void onNewIntent(Intent intent) public void onNewIntent(Intent intent)
{ {
setIntent(intent); // onNewIntent doesn't autoset our "internal" intent setIntent(intent); // onNewIntent doesn't autoset our "internal" intent
// Only set "touchable" when we're first starting up the
// activity. otherwise we get force closes when the user
// toggles it midstream
mTouchView = K9.messageListTouchable();
String accountUuid = intent.getStringExtra(EXTRA_ACCOUNT); String accountUuid = intent.getStringExtra(EXTRA_ACCOUNT);
mAccount = Preferences.getPreferences(this).getAccount(accountUuid); mAccount = Preferences.getPreferences(this).getAccount(accountUuid);
mFolderName = intent.getStringExtra(EXTRA_FOLDER); mFolderName = intent.getStringExtra(EXTRA_FOLDER);
@ -496,7 +502,6 @@ public class MessageList
mStars = K9.messageListStars(); mStars = K9.messageListStars();
mCheckboxes = K9.messageListCheckboxes(); mCheckboxes = K9.messageListCheckboxes();
mTouchView = K9.messageListTouchable();
sortType = mController.getSortType(); sortType = mController.getSortType();
sortAscending = mController.isSortAscending(sortType); sortAscending = mController.isSortAscending(sortType);