mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-02-16 15:00:14 -05:00
Added MessageClickListener and using it in DeckAdapter
This commit is contained in:
parent
3016e30e75
commit
2e63c21d36
@ -23,6 +23,7 @@ package org.yaaic.adapter;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import org.yaaic.R;
|
||||
import org.yaaic.listener.MessageClickListener;
|
||||
import org.yaaic.model.Conversation;
|
||||
import org.yaaic.view.MessageListView;
|
||||
|
||||
@ -195,6 +196,7 @@ public class DeckAdapter extends BaseAdapter
|
||||
public MessageListView renderConversation(Conversation conversation, ViewGroup parent)
|
||||
{
|
||||
MessageListView list = new MessageListView(parent.getContext(), parent);
|
||||
list.setOnItemClickListener(new MessageClickListener());
|
||||
|
||||
MessageListAdapter adapter = conversation.getMessageListAdapter();
|
||||
if (adapter == null) {
|
||||
|
@ -69,7 +69,5 @@ public class MessageClickListener implements OnItemClickListener
|
||||
Intent intent = new Intent(group.getContext(), MessageActivity.class);
|
||||
intent.putExtra(Extra.MESSAGE, adapter.getItem(position).getText().toString());
|
||||
group.getContext().startActivity(intent);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user