This commit is contained in:
Niels Andriesse 2020-01-17 15:00:36 +11:00
parent a5aeacda63
commit 153baa294c
6 changed files with 24 additions and 3 deletions

View file

@ -383,6 +383,7 @@
<activity
android:name="org.thoughtcrime.securesms.mediasend.MediaSendActivity"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:screenOrientation="portrait"
android:theme="@style/Session.DarkTheme.NoActionBar"
android:windowSoftInputMode="stateHidden" />
<activity

18
res/drawable/ic_key.xml Normal file
View file

@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="506"
android:viewportHeight="512">
<group>
<clip-path android:pathData="M331.974,0C236.555,0 158.925,77.63 158.925,173.049C158.925,194.262 162.694,214.876 170.136,234.452L4.672,399.928C2.307,402.294 0.978,405.501 0.978,408.845L0.978,499.389C0.978,506.354 6.624,512 13.589,512L88.205,512C91.546,512 94.75,510.675 97.115,508.314L122.26,483.207C124.63,480.841 125.961,477.63 125.961,474.282L125.961,443.406L156.798,443.406C163.763,443.406 169.409,437.76 169.409,430.795L169.409,418.435L181.77,418.435C188.734,418.435 194.381,412.789 194.381,405.824L194.381,378.688L221.517,378.688C224.861,378.688 228.068,377.359 230.434,374.994L270.555,334.873C290.134,342.322 310.751,346.096 331.972,346.096C427.391,346.096 505.021,268.466 505.021,173.047C505.021,77.63 427.393,0 331.974,0ZM331.974,320.874C311.332,320.874 291.368,316.705 272.635,308.481C267.791,306.355 262.336,307.525 258.764,311.006C258.725,311.043 258.687,311.073 258.649,311.112L216.295,353.466L181.772,353.466C174.807,353.466 169.161,359.112 169.161,366.077L169.161,393.213L156.8,393.213C149.836,393.213 144.189,398.859 144.189,405.824L144.189,418.184L113.351,418.184C106.387,418.184 100.74,423.83 100.74,430.795L100.74,469.052L82.987,486.777L26.202,486.777L26.202,468.956L180.343,314.816C184.776,310.383 184.776,303.197 180.343,298.765C175.91,294.333 168.726,294.331 164.29,298.765L26.202,436.854L26.202,414.07L193.898,246.362C193.936,246.324 193.965,246.289 194,246.252C197.482,242.683 198.656,237.228 196.53,232.38C188.314,213.648 184.15,193.685 184.15,173.05C184.15,91.538 250.465,25.223 331.977,25.223C413.489,25.223 479.802,91.537 479.802,173.05C479.802,254.56 413.484,320.874 331.974,320.874Z M 0,0"/>
<path
android:fillColor="#FFFFFF"
android:pathData="M-4.022,-5L510.021,-5L510.021,517L-4.022,517Z"/>
</group>
<group>
<clip-path android:pathData="M384.638,73.144C358.591,73.144 337.401,94.334 337.401,120.381C337.401,146.428 358.591,167.618 384.638,167.618C410.685,167.618 431.875,146.428 431.875,120.381C431.875,94.334 410.686,73.144 384.638,73.144ZM384.638,142.396C372.499,142.396 362.623,132.52 362.623,120.381C362.623,108.242 372.499,98.366 384.638,98.366C396.777,98.366 406.653,108.242 406.653,120.381C406.653,132.52 396.777,142.396 384.638,142.396Z M 0,0"/>
<path
android:fillColor="#FFFFFF"
android:pathData="M332.401,68.144L436.875,68.144L436.875,172.618L332.401,172.618Z"/>
</group>
</vector>

View file

@ -33,6 +33,8 @@
android:id="@+id/titleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:ellipsize="end"
android:text="Conversation"
android:textColor="@color/text"
android:textSize="@dimen/large_font_size"

View file

@ -18,7 +18,7 @@
<item android:title="@string/activity_conversation_copy_public_key_button_title"
android:id="@+id/menu_context_copy_public_key"
android:icon="@drawable/ic_profile_default"
android:icon="@drawable/ic_key"
app:showAsAction="always" />
<!-- <item android:title="@string/conversation_context__menu_forward_message"

View file

@ -3112,7 +3112,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
} else if (userLinkedDeviceHexEncodedPublicKeys.contains(recipient.getAddress().toString().toLowerCase())) {
titleTextView.setText("Note to Self");
} else {
titleTextView.setText(recipient.getName());
titleTextView.setText((recipient.getName() == null || recipient.getName().isEmpty()) ? recipient.getAddress().toString() : recipient.getName());
}
}

View file

@ -61,7 +61,7 @@ class ConversationView : LinearLayout {
}
profilePictureView.glide = glide
profilePictureView.update()
val senderDisplayName = if (thread.recipient.isLocalNumber) context.getString(R.string.note_to_self) else thread.recipient.name
val senderDisplayName = if (thread.recipient.isLocalNumber) context.getString(R.string.note_to_self) else if (!thread.recipient.name.isNullOrEmpty()) thread.recipient.name else thread.recipient.address.toString()
displayNameTextView.text = senderDisplayName
timestampTextView.text = DateUtils.getBriefRelativeTimeSpanString(context, Locale.getDefault(), thread.date)
muteIndicatorImageView.visibility = if (thread.recipient.isMuted) VISIBLE else GONE