1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-24 08:38:51 -05:00

Don't crash if "footer view" is clicked in search results

Fixes issue 3071
This commit is contained in:
cketti 2011-05-01 05:34:17 +02:00
parent f2283aa91e
commit 01937d4ab8

View File

@ -567,9 +567,10 @@ public class MessageList
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// Use mListView.getAdapter() to get the WrapperListAdapter that includes the footer view.
if (mCurrentFolder != null && ((position + 1) == mListView.getAdapter().getCount())) {
mController.loadMoreMessages(mAccount, mFolderName, mAdapter.mListener);
if (view == mFooterView) {
if (mCurrentFolder != null) {
mController.loadMoreMessages(mAccount, mFolderName, mAdapter.mListener);
}
return;
}