mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
parent
db2c7fabe1
commit
c05aca19ae
@ -52,7 +52,7 @@ public class ConversationFragment extends ListFragment
|
||||
private static final String TAG = ConversationFragment.class.getSimpleName();
|
||||
|
||||
private final ActionModeCallback actionModeCallback = new ActionModeCallback();
|
||||
private final SelectionClickListener selectionClickListener = new SelectionClickListener();
|
||||
private final SelectionClickListener selectionClickListener = new ConversationFragmentSelectionClickListener();
|
||||
|
||||
private ConversationFragmentListener listener;
|
||||
|
||||
@ -289,8 +289,11 @@ public class ConversationFragment extends ListFragment
|
||||
public void setComposeText(String text);
|
||||
}
|
||||
|
||||
public class SelectionClickListener
|
||||
implements AdapterView.OnItemLongClickListener, AdapterView.OnItemClickListener
|
||||
public interface SelectionClickListener extends
|
||||
AdapterView.OnItemLongClickListener, AdapterView.OnItemClickListener {}
|
||||
|
||||
private class ConversationFragmentSelectionClickListener
|
||||
implements SelectionClickListener
|
||||
{
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
@ -29,6 +29,7 @@ import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.provider.ContactsContract;
|
||||
import android.provider.ContactsContract.QuickContact;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@ -162,8 +163,10 @@ public class ConversationItem extends LinearLayout {
|
||||
if (mmsThumbnail != null) mmsThumbnail.setOnLongClickListener(new MultiSelectLongClickListener());
|
||||
}
|
||||
|
||||
public void set(MasterSecret masterSecret, MessageRecord messageRecord,
|
||||
Set<MessageRecord> batchSelected, SelectionClickListener selectionClickListener,
|
||||
public void set(@NonNull MasterSecret masterSecret,
|
||||
@NonNull MessageRecord messageRecord,
|
||||
@NonNull Set<MessageRecord> batchSelected,
|
||||
@NonNull SelectionClickListener selectionClickListener,
|
||||
boolean groupThread, boolean pushDestination)
|
||||
{
|
||||
this.masterSecret = masterSecret;
|
||||
|
@ -18,7 +18,6 @@ package org.thoughtcrime.securesms;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Paint;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.LoaderManager.LoaderCallbacks;
|
||||
@ -28,6 +27,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -52,6 +52,9 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* @author Jake McGinty
|
||||
*/
|
||||
public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity implements LoaderCallbacks<Cursor> {
|
||||
private final static String TAG = MessageDetailsActivity.class.getSimpleName();
|
||||
|
||||
@ -148,7 +151,7 @@ public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity
|
||||
toFromRes = R.string.message_details_header__from;
|
||||
}
|
||||
toFrom.setText(toFromRes);
|
||||
conversationItem.set(masterSecret, messageRecord, new HashSet<MessageRecord>(), null,
|
||||
conversationItem.set(masterSecret, messageRecord, new HashSet<MessageRecord>(), new NullSelectionListener(),
|
||||
recipients != messageRecord.getRecipients(),
|
||||
DirectoryHelper.isPushDestination(this, recipients));
|
||||
recipientsList.setAdapter(new MessageDetailsRecipientAdapter(this, masterSecret, messageRecord,
|
||||
@ -278,6 +281,14 @@ public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity
|
||||
metadataContainer.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class NullSelectionListener implements ConversationFragment.SelectionClickListener {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {}
|
||||
@Override
|
||||
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user