Fixed occasional IllegalStateException
This commit is contained in:
parent
6407f1101a
commit
0e212539e9
@ -149,6 +149,7 @@ public class SearchAdapter extends BaseAdapter implements Filterable {
|
|||||||
mFilteredList.clear();
|
mFilteredList.clear();
|
||||||
mFilteredList.addAll(list);
|
mFilteredList.addAll(list);
|
||||||
}
|
}
|
||||||
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -193,7 +194,6 @@ public class SearchAdapter extends BaseAdapter implements Filterable {
|
|||||||
}
|
}
|
||||||
mHistory = mDatabaseHandler.findItemsContaining(constraint.toString());
|
mHistory = mDatabaseHandler.findItemsContaining(constraint.toString());
|
||||||
|
|
||||||
mFilteredList = getSuggestions();
|
|
||||||
results.count = 1;
|
results.count = 1;
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
@ -205,6 +205,7 @@ public class SearchAdapter extends BaseAdapter implements Filterable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void publishResults(CharSequence constraint, FilterResults results) {
|
protected void publishResults(CharSequence constraint, FilterResults results) {
|
||||||
|
mFilteredList = getSuggestions();
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user