Skip to content

Commit

Permalink
Fix long press on image thumbnail in detail view.
Browse files Browse the repository at this point in the history
Allow long press to select inside select mode.
  • Loading branch information
alan-signal authored and greyson-signal committed Dec 5, 2019
1 parent 1cc8634 commit 0063434
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -283,7 +283,6 @@ public void bind(@NonNull Context context, @NonNull MediaDatabase.MediaRecord me
}

thumbnailView.setImageResource(glideRequests, slide, false, false);

thumbnailView.setOnClickListener(view -> itemClickListener.onMediaClicked(mediaRecord));
thumbnailView.setOnLongClickListener(view -> onLongClick());
}
Expand Down Expand Up @@ -466,6 +465,7 @@ public void bind(@NonNull Context context, @NonNull MediaDatabase.MediaRecord me

thumbnailView.setImageResource(glideRequests, slide, false, false);
thumbnailView.setOnClickListener(view -> itemClickListener.onMediaClicked(mediaRecord));
thumbnailView.setOnLongClickListener(view -> onLongClick());
}

@Override
Expand Down
Expand Up @@ -253,10 +253,10 @@ private static void showFileExternally(@NonNull Context context, @NonNull MediaD

@Override
public void onMediaLongClicked(MediaDatabase.MediaRecord mediaRecord) {
if (actionMode == null) {
((MediaGalleryAllAdapter) recyclerView.getAdapter()).toggleSelection(mediaRecord);
recyclerView.getAdapter().notifyDataSetChanged();
((MediaGalleryAllAdapter) recyclerView.getAdapter()).toggleSelection(mediaRecord);
recyclerView.getAdapter().notifyDataSetChanged();

if (actionMode == null) {
enterMultiSelect();
}
}
Expand Down

0 comments on commit 0063434

Please sign in to comment.