mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 10:05:15 +00:00
SES-2814 - show empty state when conversations are empty
This commit is contained in:
parent
c9c9078c2e
commit
61fe7b17d0
@ -1123,8 +1123,8 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
val openGroup = viewModel.openGroup
|
||||
|
||||
// Get the correct placeholder text for this type of empty conversation
|
||||
val isNoteToSelf = recipient.isLocalNumber
|
||||
val txtCS: CharSequence = when {
|
||||
// note to self
|
||||
recipient.isLocalNumber -> getString(R.string.noteToSelfEmpty)
|
||||
|
||||
// If this is a community which we cannot write to
|
||||
@ -1141,8 +1141,8 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
.format()
|
||||
}
|
||||
|
||||
recipient.isGroupRecipient -> {
|
||||
// If this is a group or community that we CAN send messages to
|
||||
// 10n1 and groups
|
||||
recipient.is1on1 || recipient.isGroupRecipient -> {
|
||||
Phrase.from(applicationContext, R.string.groupNoMessages)
|
||||
.put(GROUP_NAME_KEY, recipient.toShortString())
|
||||
.format()
|
||||
|
@ -102,7 +102,11 @@ public class ThreadRecord extends DisplayRecord {
|
||||
|
||||
@Override
|
||||
public CharSequence getDisplayBody(@NonNull Context context) {
|
||||
if (isGroupUpdateMessage()) {
|
||||
// no need to display anything if there are no messages
|
||||
if(lastMessage == null){
|
||||
return "";
|
||||
}
|
||||
else if (isGroupUpdateMessage()) {
|
||||
return context.getString(R.string.groupUpdated);
|
||||
} else if (isOpenGroupInvitation()) {
|
||||
return context.getString(R.string.communityInvitation);
|
||||
|
@ -271,14 +271,14 @@
|
||||
|
||||
<TextView
|
||||
android:padding="@dimen/medium_spacing"
|
||||
android:textSize="@dimen/small_font_size"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
style="@style/Signal.Text.Preview"
|
||||
android:textColor="?android:textColorTertiary"
|
||||
android:textAlignment="center"
|
||||
android:id="@+id/placeholderText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/large_spacing"
|
||||
app:layout_constraintTop_toBottomOf="@+id/outdatedBanner"
|
||||
android:elevation="8dp"
|
||||
android:contentDescription="@string/AccessibilityId_control_message"
|
||||
tools:text="Some Control Message Text"
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user