mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
#45 - Rename group chats
This commit is contained in:
@@ -36,5 +36,10 @@ open class Conversation : RealmObject() {
|
||||
var me: Boolean = false
|
||||
var draft: String = ""
|
||||
|
||||
fun getTitle() = recipients.joinToString { recipient -> recipient.getDisplayName() }
|
||||
// For group chats, the user is allowed to set a custom title for the conversation
|
||||
var name: String = ""
|
||||
|
||||
fun getTitle(): String {
|
||||
return name.takeIf { it.isNotBlank() } ?: recipients.joinToString { recipient -> recipient.getDisplayName() }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user