Skip to content

Commit

Permalink
Merge pull request #10386 from wordpress-mobile/issue/9987-reader-search
Browse files Browse the repository at this point in the history
Synchronize Reader Search adapter
  • Loading branch information
malinajirka authored Aug 20, 2019
2 parents 6a6c100 + 8d8b976 commit a1b5e47
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public ReaderSearchSuggestionAdapter(Context context) {
mSuggestionBgColor = ContextCompat.getColor(context, R.color.neutral_0);
}

public void setFilter(String filter) {
public synchronized void setFilter(String filter) {
// skip if unchanged
if (isCurrentFilter(filter) && getCursor() != null) {
return;
Expand Down Expand Up @@ -74,7 +74,7 @@ public void setFilter(String filter) {
/*
* forces setFilter() to always repopulate by skipping the isCurrentFilter() check
*/
private void reload() {
private synchronized void reload() {
String newFilter = mCurrentFilter;
mCurrentFilter = null;
setFilter(newFilter);
Expand Down Expand Up @@ -180,7 +180,7 @@ public void onClick(DialogInterface dialog, int id) {
alert.show();
}

private void clearSavedSearches() {
private synchronized void clearSavedSearches() {
ReaderSearchTable.deleteAllQueries();
swapCursor(null);
}
Expand Down

0 comments on commit a1b5e47

Please sign in to comment.