properly set the thread title if it contains no messages
This commit is contained in:
parent
ef09a8871a
commit
fb45d68835
3 changed files with 14 additions and 4 deletions
|
|
@ -60,11 +60,15 @@ class ThreadActivity : SimpleActivity() {
|
|||
|
||||
ensureBackgroundThread {
|
||||
messages = getMessages(threadId)
|
||||
participants = messages.first().participants
|
||||
participants = if (messages.isEmpty()) {
|
||||
getThreadParticipants(threadId)
|
||||
} else {
|
||||
messages.first().participants
|
||||
}
|
||||
setupAdapter()
|
||||
|
||||
runOnUiThread {
|
||||
supportActionBar?.title = messages.first().getThreadTitle()
|
||||
supportActionBar?.title = participants.getThreadTitle()
|
||||
}
|
||||
}
|
||||
setupButtons()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue