From 8d8b976ca0509e7df74d57b1a4fe986c9a2c0d22 Mon Sep 17 00:00:00 2001
From: malinajirka <malinajirka@gmail.com>
Date: Tue, 13 Aug 2019 10:14:30 +0200
Subject: [PATCH] Synchronize Reader Search adapter

---
 .../ui/reader/adapters/ReaderSearchSuggestionAdapter.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/WordPress/src/main/java/org/wordpress/android/ui/reader/adapters/ReaderSearchSuggestionAdapter.java b/WordPress/src/main/java/org/wordpress/android/ui/reader/adapters/ReaderSearchSuggestionAdapter.java
index ee31a2b7f130..ad73ec702725 100644
--- a/WordPress/src/main/java/org/wordpress/android/ui/reader/adapters/ReaderSearchSuggestionAdapter.java
+++ b/WordPress/src/main/java/org/wordpress/android/ui/reader/adapters/ReaderSearchSuggestionAdapter.java
@@ -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;
@@ -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);
@@ -180,7 +180,7 @@ public void onClick(DialogInterface dialog, int id) {
         alert.show();
     }
 
-    private void clearSavedSearches() {
+    private synchronized void clearSavedSearches() {
         ReaderSearchTable.deleteAllQueries();
         swapCursor(null);
     }