mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-26 01:28:50 -05:00
Fix pull to refresh for normal list vs. "remote search"-able
This commit is contained in:
parent
1b98ce57e1
commit
cba9d8fc88
@ -857,15 +857,7 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mSingleFolderMode) {
|
if (mSingleFolderMode) {
|
||||||
if (!mAccount.allowRemoteSearch()) {
|
if (mRemoteSearch && mAccount.allowRemoteSearch()) {
|
||||||
mPullToRefreshView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener<ListView>() {
|
|
||||||
@Override
|
|
||||||
public void onRefresh(PullToRefreshBase<ListView> refreshView) {
|
|
||||||
checkMail();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// TODO this has to go! find better remote search integration
|
|
||||||
} else {
|
|
||||||
mPullToRefreshView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener<ListView>() {
|
mPullToRefreshView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener<ListView>() {
|
||||||
@Override
|
@Override
|
||||||
public void onRefresh(PullToRefreshBase<ListView> refreshView) {
|
public void onRefresh(PullToRefreshBase<ListView> refreshView) {
|
||||||
@ -875,6 +867,13 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||||||
});
|
});
|
||||||
mPullToRefreshView.setPullLabel(getString(R.string.pull_to_refresh_remote_search_from_local_search_pull));
|
mPullToRefreshView.setPullLabel(getString(R.string.pull_to_refresh_remote_search_from_local_search_pull));
|
||||||
mPullToRefreshView.setReleaseLabel(getString(R.string.pull_to_refresh_remote_search_from_local_search_release));
|
mPullToRefreshView.setReleaseLabel(getString(R.string.pull_to_refresh_remote_search_from_local_search_release));
|
||||||
|
} else {
|
||||||
|
mPullToRefreshView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener<ListView>() {
|
||||||
|
@Override
|
||||||
|
public void onRefresh(PullToRefreshBase<ListView> refreshView) {
|
||||||
|
checkMail();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mPullToRefreshView.setMode(PullToRefreshBase.Mode.DISABLED);
|
mPullToRefreshView.setMode(PullToRefreshBase.Mode.DISABLED);
|
||||||
|
Loading…
Reference in New Issue
Block a user