jenkins-bot has submitted this change and it was merged.

Change subject: Fix clicking on History search results.

Fix clicking on History search results.

This was because the click handler for History items ignores the click if
an ActionMode is present (to account for the existing implementation of
the long-press-to-delete ActionMode). This is now fixed by setting a "tag"
on the search ActionMode, so that we can distinguish which ActionMode is
currently active.

Bug: T147854
Change-Id: Id55301a7bd4791a9a965fadf3b3ceee1486e48a2
M app/src/main/java/org/wikipedia/
M app/src/main/java/org/wikipedia/history/
2 files changed, 4 insertions(+), 1 deletion(-)

  jenkins-bot: Verified
  Niedzielski: Looks good to me, approved

diff --git a/app/src/main/java/org/wikipedia/ 
index 616f44e..8caf379 100644
--- a/app/src/main/java/org/wikipedia/
+++ b/app/src/main/java/org/wikipedia/
@@ -9,10 +9,12 @@
 import org.wikipedia.util.DeviceUtil;
 public abstract class SearchActionModeCallback implements ActionMode.Callback {
+    public static final String ACTION_MODE_TAG = "searchActionMode";
     private SearchView searchView;
     public boolean onCreateActionMode(ActionMode mode, Menu menu) {
+        mode.setTag(ACTION_MODE_TAG);
         mode.getMenuInflater().inflate(, menu);
         searchView = (SearchView) 
diff --git a/app/src/main/java/org/wikipedia/history/ 
index eb5010f..3db61cf 100644
--- a/app/src/main/java/org/wikipedia/history/
+++ b/app/src/main/java/org/wikipedia/history/
@@ -228,7 +228,8 @@
     private class HistoryItemClickListener implements 
AdapterView.OnItemClickListener {
         public void onItemClick(AdapterView<?> parent, View view, int 
position, long id) {
-            if (actionMode == null) {
+            if (actionMode == null
+                    || 
SearchActionModeCallback.ACTION_MODE_TAG.equals(actionMode.getTag())) {
                 HistoryEntry oldEntry = (HistoryEntry) view.getTag();
                 HistoryEntry newEntry = new HistoryEntry(oldEntry.getTitle(), 
                 onPageClick(oldEntry.getTitle(), newEntry);

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: Id55301a7bd4791a9a965fadf3b3ceee1486e48a2
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <>
Gerrit-Reviewer: BearND <>
Gerrit-Reviewer: Brion VIBBER <>
Gerrit-Reviewer: Mholloway <>
Gerrit-Reviewer: Niedzielski <>
Gerrit-Reviewer: jenkins-bot <>

MediaWiki-commits mailing list

Reply via email to