mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 10:09:30 +00:00
icon, contact list and conversation redesign
This commit is contained in:
@@ -17,10 +17,12 @@
|
||||
package org.thoughtcrime.securesms.database.model;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.text.style.TextAppearanceSpan;
|
||||
|
||||
import org.thoughtcrime.securesms.database.MmsSmsColumns;
|
||||
import org.thoughtcrime.securesms.database.SmsDatabase;
|
||||
@@ -125,7 +127,7 @@ public abstract class MessageRecord extends DisplayRecord {
|
||||
|
||||
protected SpannableString emphasisAdded(String sequence) {
|
||||
SpannableString spannable = new SpannableString(sequence);
|
||||
spannable.setSpan(new ForegroundColorSpan(context.getResources().getColor(android.R.color.darker_gray)), 0, sequence.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
spannable.setSpan(new TextAppearanceSpan(context, android.R.style.TextAppearance_Small), 0, sequence.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
spannable.setSpan(new StyleSpan(android.graphics.Typeface.ITALIC), 0, sequence.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
|
||||
return spannable;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class SmsMessageRecord extends MessageRecord {
|
||||
@Override
|
||||
public SpannableString getDisplayBody() {
|
||||
if (isProcessedKeyExchange()) {
|
||||
return emphasisAdded(context.getString(R.string.ConversationItem_received_and_processed_key_exchange_message));
|
||||
return new SpannableString("");
|
||||
} else if (isStaleKeyExchange()) {
|
||||
return emphasisAdded(context.getString(R.string.ConversationItem_error_received_stale_key_exchange_message));
|
||||
} else if (isCorruptedKeyExchange()) {
|
||||
@@ -63,7 +63,7 @@ public class SmsMessageRecord extends MessageRecord {
|
||||
} else if (isBundleKeyExchange()) {
|
||||
return emphasisAdded(context.getString(R.string.SmsMessageRecord_received_message_with_unknown_identity_key_click_to_process));
|
||||
} else if (isKeyExchange() && isOutgoing()) {
|
||||
return emphasisAdded(context.getString(R.string.ConversationListAdapter_key_exchange_message));
|
||||
return new SpannableString("");
|
||||
} else if (isKeyExchange() && !isOutgoing()) {
|
||||
return emphasisAdded(context.getString(R.string.ConversationItem_received_key_exchange_message_click_to_process));
|
||||
} else if (SmsDatabase.Types.isFailedDecryptType(type)) {
|
||||
|
||||
Reference in New Issue
Block a user