diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt b/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt
index dd1ac496a..1f637ca2b 100644
--- a/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt
+++ b/app/src/main/java/com/nextcloud/talk/controllers/ConversationInfoController.kt
@@ -125,6 +125,12 @@ class ConversationInfoController(args: Bundle) : BaseController(args), FlexibleA
@BindView(R.id.display_name_text)
lateinit var conversationDisplayName: EmojiTextView
+ @BindView(R.id.conversation_description)
+ lateinit var descriptionCategoryView: MaterialPreferenceCategory
+
+ @BindView(R.id.description_text)
+ lateinit var conversationDescription: EmojiTextView
+
@BindView(R.id.participants_list_category)
lateinit var participantsListCategory: MaterialPreferenceCategory
@@ -600,6 +606,11 @@ class ConversationInfoController(args: Bundle) : BaseController(args), FlexibleA
conversationDisplayName.text = conversation!!.displayName
+ if (conversation!!.description != null && !conversation!!.description.isEmpty()) {
+ conversationDescription.text = conversation!!.description
+ descriptionCategoryView.visibility = View.VISIBLE
+ }
+
loadConversationAvatar()
adjustNotificationLevelUI()
diff --git a/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.java b/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.java
index 9a40f9aa3..bc81ef087 100644
--- a/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.java
+++ b/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.java
@@ -46,6 +46,8 @@ public class Conversation {
public String name;
@JsonField(name = "displayName")
public String displayName;
+ @JsonField(name = "description")
+ public String description;
@JsonField(name = "type", typeConverter = EnumRoomTypeConverter.class)
public ConversationType type;
@JsonField(name = "lastPing")
@@ -158,6 +160,10 @@ public class Conversation {
return this.name;
}
+ public String getDescription() {
+ return this.description;
+ }
+
public String getDisplayName() {
return this.displayName;
}
@@ -246,6 +252,10 @@ public class Conversation {
this.name = name;
}
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
@@ -374,6 +384,9 @@ public class Conversation {
if (displayName != null ? !displayName.equals(that.displayName) : that.displayName != null) {
return false;
}
+ if (description != null ? !description.equals(that.description) : that.description != null) {
+ return false;
+ }
if (type != that.type) {
return false;
}
@@ -423,6 +436,7 @@ public class Conversation {
result = 31 * result + token.hashCode();
result = 31 * result + (name != null ? name.hashCode() : 0);
result = 31 * result + (displayName != null ? displayName.hashCode() : 0);
+ result = 31 * result + (description != null ? description.hashCode() : 0);
result = 31 * result + type.hashCode();
result = 31 * result + (int) (lastPing ^ (lastPing >>> 32));
result = 31 * result + (participants != null ? participants.hashCode() : 0);
@@ -454,6 +468,7 @@ public class Conversation {
", token='" + token + '\'' +
", name='" + name + '\'' +
", displayName='" + displayName + '\'' +
+ ", description='" + description + '\'' +
", type=" + type +
", lastPing=" + lastPing +
", participants=" + participants +
diff --git a/app/src/main/res/layout/controller_conversation_info.xml b/app/src/main/res/layout/controller_conversation_info.xml
index 57c6cefd5..ddd597588 100644
--- a/app/src/main/res/layout/controller_conversation_info.xml
+++ b/app/src/main/res/layout/controller_conversation_info.xml
@@ -82,10 +82,31 @@
+
+
+
+
+ Lint Report: 3 errors and 346 warnings
+ Lint Report: 3 errors and 348 warnings