mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 03:29:28 +01:00
added error handling
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This commit is contained in:
parent
7a04a9c9c6
commit
7e1b4a85ea
@ -195,6 +195,18 @@ class ConversationInfoActivity :
|
|||||||
binding.addParticipantsAction.setOnClickListener { addParticipants() }
|
binding.addParticipantsAction.setOnClickListener { addParticipants() }
|
||||||
binding.listBansButton.setOnClickListener { listBans() }
|
binding.listBansButton.setOnClickListener { listBans() }
|
||||||
|
|
||||||
|
updateRoomAndCapabilities()
|
||||||
|
|
||||||
|
themeTextViews()
|
||||||
|
themeSwitchPreferences()
|
||||||
|
|
||||||
|
binding.addParticipantsAction.visibility = GONE
|
||||||
|
|
||||||
|
binding.progressBar.let { viewThemeUtils.platform.colorCircularProgressBar(it, ColorRole.PRIMARY) }
|
||||||
|
initObservers()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun updateRoomAndCapabilities() {
|
||||||
CoroutineScope(Dispatchers.IO).launch {
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
val model = viewModel.getRoomBlocking(conversationUser, conversationToken)
|
val model = viewModel.getRoomBlocking(conversationUser, conversationToken)
|
||||||
spreedCapabilities = viewModel.getCapabilitiesBlocking(conversationUser, conversationToken, model)
|
spreedCapabilities = viewModel.getCapabilitiesBlocking(conversationUser, conversationToken, model)
|
||||||
@ -218,15 +230,11 @@ class ConversationInfoActivity :
|
|||||||
|
|
||||||
handleConversation()
|
handleConversation()
|
||||||
}
|
}
|
||||||
|
}.invokeOnCompletion { cause ->
|
||||||
|
if (cause != null) {
|
||||||
|
Log.d(TAG, "Error retrieving room and capabilities $cause")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
themeTextViews()
|
|
||||||
themeSwitchPreferences()
|
|
||||||
|
|
||||||
binding.addParticipantsAction.visibility = GONE
|
|
||||||
|
|
||||||
binding.progressBar.let { viewThemeUtils.platform.colorCircularProgressBar(it, ColorRole.PRIMARY) }
|
|
||||||
initObservers()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initObservers() {
|
private fun initObservers() {
|
||||||
@ -800,8 +808,9 @@ class ConversationInfoActivity :
|
|||||||
binding.archiveConversationText.text = resources.getString(R.string.unarchive_conversation)
|
binding.archiveConversationText.text = resources.getString(R.string.unarchive_conversation)
|
||||||
binding.archiveConversationTextHint.text = resources.getString(R.string.unarchive_hint)
|
binding.archiveConversationTextHint.text = resources.getString(R.string.unarchive_hint)
|
||||||
}
|
}
|
||||||
|
}.invokeOnCompletion {
|
||||||
|
updateRoomAndCapabilities()
|
||||||
}
|
}
|
||||||
viewModel.getRoom(conversationUser, conversationToken)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conversation!!.hasArchived) {
|
if (conversation!!.hasArchived) {
|
||||||
|
Loading…
Reference in New Issue
Block a user