Fix for detached illegalstateexception
This commit is contained in:
parent
6fedc6b737
commit
ff41c6763d
1 changed files with 6 additions and 3 deletions
|
@ -112,10 +112,13 @@ public class ConversationListFragment extends SherlockListFragment
|
|||
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||
@Override
|
||||
public boolean onQueryTextSubmit(String query) {
|
||||
if (isAdded()) {
|
||||
ConversationListFragment.this.queryFilter = query;
|
||||
ConversationListFragment.this.getLoaderManager().restartLoader(0, null, ConversationListFragment.this);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean onQueryTextChange(String newText) {
|
||||
return onQueryTextSubmit(newText);
|
||||
|
|
Loading…
Add table
Reference in a new issue