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

Only show message list footer when displaying a single folder

This commit is contained in:
cketti 2012-10-24 04:34:41 +02:00
parent ec76dca57f
commit c7a2080b34

View File

@ -763,8 +763,10 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
mCurrentFolder = getFolder(mFolderName, mAccount);
}
// Hide "Load up to x more" footer for search views
mFooterView.setVisibility((!mSingleFolderMode) ? View.GONE : View.VISIBLE);
if (mSingleFolderMode) {
mListView.addFooterView(getFooterView(mListView));
updateFooterView();
}
mController = MessagingController.getInstance(getActivity().getApplication());
mListView.setAdapter(mAdapter);
@ -916,8 +918,6 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
mListView.setFastScrollEnabled(true);
mListView.setScrollingCacheEnabled(false);
mListView.setOnItemClickListener(this);
mListView.addFooterView(getFooterView(mListView));
//mListView.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
registerForContextMenu(mListView);
}
@ -1778,6 +1778,10 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
}
public void updateFooter(final String text, final boolean progressVisible) {
if (mFooterView == null) {
return;
}
FooterViewHolder holder = (FooterViewHolder) mFooterView.getTag();
holder.progress.setVisibility(progressVisible ? ProgressBar.VISIBLE : ProgressBar.INVISIBLE);