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; ...@@ -96,7 +96,7 @@ import permissions.dispatcher.RuntimePermissions;
public class RoomFragment extends AbstractChatRoomFragment implements public class RoomFragment extends AbstractChatRoomFragment implements
OnBackPressListener, OnBackPressListener,
ExtraActionPickerDialogFragment.Callback, ExtraActionPickerDialogFragment.Callback,
ModelListAdapter.OnItemClickListener<PairedMessage>, ModelListAdapter.OnItemLongClickListener<PairedMessage>,
RoomContract.View { RoomContract.View {
private static final int DIALOG_ID = 1; private static final int DIALOG_ID = 1;
...@@ -207,7 +207,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements ...@@ -207,7 +207,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
messageListAdapter = new MessageListAdapter(getContext(), hostname); messageListAdapter = new MessageListAdapter(getContext(), hostname);
messageRecyclerView.setAdapter(messageListAdapter); messageRecyclerView.setAdapter(messageListAdapter);
messageListAdapter.setOnItemClickListener(this); messageListAdapter.setOnItemLongClickListener(this);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, true); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, true);
messageRecyclerView.setLayoutManager(linearLayoutManager); messageRecyclerView.setLayoutManager(linearLayoutManager);
...@@ -292,8 +292,9 @@ public class RoomFragment extends AbstractChatRoomFragment implements ...@@ -292,8 +292,9 @@ public class RoomFragment extends AbstractChatRoomFragment implements
} }
@Override @Override
public void onItemClick(PairedMessage pairedMessage) { public boolean onItemLongClick(PairedMessage pairedMessage) {
presenter.onMessageSelected(pairedMessage.target); presenter.onMessageSelected(pairedMessage.target);
return true;
} }
private void setupToolbar() { 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