Handle temporary threads in conversations details

This commit is contained in:
Naveen 2023-02-28 19:23:19 +05:30
parent c94b8852cd
commit eeb87836e2
1 changed files with 6 additions and 1 deletions

View File

@ -34,7 +34,12 @@ class ConversationDetailsActivity : SimpleActivity() {
threadId = intent.getLongExtra(THREAD_ID, 0L) threadId = intent.getLongExtra(THREAD_ID, 0L)
ensureBackgroundThread { ensureBackgroundThread {
conversation = conversationsDB.getConversationWithThreadId(threadId) conversation = conversationsDB.getConversationWithThreadId(threadId)
participants = getThreadParticipants(threadId, null) participants = if (conversation != null && conversation!!.isScheduled) {
val message = messagesDB.getThreadMessages(conversation!!.threadId).firstOrNull()
message?.participants ?: arrayListOf()
} else {
getThreadParticipants(threadId, null)
}
runOnUiThread { runOnUiThread {
setupTextViews() setupTextViews()
setupParticipants() setupParticipants()