Commit b125b252 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Use long press instead of short to access context menu for message actions

parent 28546b7c
......@@ -96,7 +96,7 @@ import permissions.dispatcher.RuntimePermissions;
public class RoomFragment extends AbstractChatRoomFragment implements
OnBackPressListener,
ExtraActionPickerDialogFragment.Callback,
ModelListAdapter.OnItemClickListener<PairedMessage>,
ModelListAdapter.OnItemLongClickListener<PairedMessage>,
RoomContract.View {
private static final int DIALOG_ID = 1;
......@@ -207,7 +207,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
messageListAdapter = new MessageListAdapter(getContext(), hostname);
messageRecyclerView.setAdapter(messageListAdapter);
messageListAdapter.setOnItemClickListener(this);
messageListAdapter.setOnItemLongClickListener(this);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, true);
messageRecyclerView.setLayoutManager(linearLayoutManager);
......@@ -292,8 +292,9 @@ public class RoomFragment extends AbstractChatRoomFragment implements
}
@Override
public void onItemClick(PairedMessage pairedMessage) {
public boolean onItemLongClick(PairedMessage pairedMessage) {
presenter.onMessageSelected(pairedMessage.target);
return true;
}
private void setupToolbar() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment