mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 08:47:46 +00:00
increase unread visibility in conv list
// FREEBIE
This commit is contained in:
parent
d586893402
commit
65c262acef
@ -21,7 +21,6 @@ import android.content.Intent;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Typeface;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.provider.Contacts.Intents;
|
||||
import android.provider.ContactsContract.QuickContact;
|
||||
@ -35,7 +34,6 @@ import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.database.model.ThreadRecord;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.recipients.Recipients;
|
||||
@ -43,7 +41,8 @@ import org.thoughtcrime.securesms.util.DateUtils;
|
||||
import org.thoughtcrime.securesms.util.Emoji;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
import static org.thoughtcrime.securesms.util.SpanUtil.color;
|
||||
|
||||
/**
|
||||
* A view that displays the element in a list of multiple conversation threads.
|
||||
@ -57,6 +56,9 @@ public class ConversationListItem extends RelativeLayout
|
||||
{
|
||||
private final static String TAG = ConversationListItem.class.getSimpleName();
|
||||
|
||||
private final static Typeface BOLD_TYPEFACE = Typeface.create("sans-serif", Typeface.BOLD);
|
||||
private final static Typeface LIGHT_TYPEFACE = Typeface.create("sans-serif-light", Typeface.NORMAL);
|
||||
|
||||
private Context context;
|
||||
private Set<Long> selectedThreads;
|
||||
private Recipients recipients;
|
||||
@ -66,7 +68,6 @@ public class ConversationListItem extends RelativeLayout
|
||||
private TextView dateView;
|
||||
private long count;
|
||||
private boolean read;
|
||||
|
||||
private ImageView contactPhotoImage;
|
||||
|
||||
private final Handler handler = new Handler();
|
||||
@ -108,12 +109,16 @@ public class ConversationListItem extends RelativeLayout
|
||||
Emoji.EMOJI_SMALL,
|
||||
new Emoji.InvalidatingPageLoadedListener(subjectView)),
|
||||
TextView.BufferType.SPANNABLE);
|
||||
this.subjectView.setTypeface(read ? LIGHT_TYPEFACE : BOLD_TYPEFACE);
|
||||
|
||||
if (thread.getDate() > 0)
|
||||
this.dateView.setText(DateUtils.getRelativeTimeSpanString(thread.getDate(),
|
||||
System.currentTimeMillis(),
|
||||
DateUtils.MINUTE_IN_MILLIS,
|
||||
DateUtils.FORMAT_ABBREV_RELATIVE));
|
||||
if (thread.getDate() > 0) {
|
||||
CharSequence date = DateUtils.getRelativeTimeSpanString(thread.getDate(),
|
||||
System.currentTimeMillis(),
|
||||
DateUtils.MINUTE_IN_MILLIS,
|
||||
DateUtils.FORMAT_ABBREV_RELATIVE);
|
||||
dateView.setText(read ? date : color(getResources().getColor(R.color.textsecure_primary), date));
|
||||
dateView.setTypeface(read ? LIGHT_TYPEFACE : BOLD_TYPEFACE);
|
||||
}
|
||||
|
||||
setBackground(read, batchMode);
|
||||
setContactPhoto(this.recipients.getPrimaryRecipient());
|
||||
|
Loading…
x
Reference in New Issue
Block a user