Merge pull request #498 from Naveen3Singh/feature_group_details

Add ability to change group names
This commit is contained in:
Tibor Kaputa 2022-11-25 23:00:04 +01:00 committed by GitHub
commit 0686611c95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 428 additions and 49 deletions

View file

@ -1014,6 +1014,16 @@ fun Context.subscriptionManagerCompat(): SubscriptionManager {
}
}
fun Context.renameConversation(conversation: Conversation, newTitle: String): Conversation {
val updatedConv = conversation.copy(title = newTitle, usesCustomTitle = true)
try {
conversationsDB.insertOrUpdate(updatedConv)
} catch (e: Exception) {
e.printStackTrace()
}
return updatedConv
}
fun Context.createTemporaryThread(message: Message, threadId: Long = generateRandomId()) {
val simpleContactHelper = SimpleContactsHelper(this)
val addresses = message.participants.getAddresses()