mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 12:39:58 +01:00
Show progress bar while performing network operations
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
3367bd5253
commit
618bcf5790
@ -153,6 +153,7 @@ class ContactsView<T : Any>(private val bundle: Bundle? = null) : BaseView() {
|
||||
operationState.observe(this@ContactsView) { operationState ->
|
||||
when (operationState.operationState) {
|
||||
ContactsViewOperationState.OK -> {
|
||||
searchLayout?.searchProgressBar?.isVisible = true
|
||||
val bundle = Bundle()
|
||||
if (!hasToken || isNewGroupConversation) {
|
||||
bundle.putString(BundleKeys.KEY_CONVERSATION_TOKEN, operationState.conversationToken)
|
||||
@ -165,10 +166,11 @@ class ContactsView<T : Any>(private val bundle: Bundle? = null) : BaseView() {
|
||||
}
|
||||
}
|
||||
ContactsViewOperationState.PROCESSING -> {
|
||||
// show progress bar and disable everything
|
||||
searchLayout?.searchProgressBar?.isVisible = true
|
||||
}
|
||||
ContactsViewOperationState.CONVERSATION_CREATION_FAILED -> {
|
||||
// dunno what to do yet, an error message somewhere
|
||||
searchLayout?.searchProgressBar?.isVisible = false
|
||||
}
|
||||
else -> {
|
||||
// do nothing, we're waiting
|
||||
|
@ -284,7 +284,7 @@ class ConversationsListView : BaseView() {
|
||||
|
||||
return items
|
||||
}
|
||||
|
||||
|
||||
override fun onFloatingActionButtonClick() {
|
||||
router?.pushController(
|
||||
RouterTransaction.with(ContactsView<Any>())
|
||||
|
Loading…
Reference in New Issue
Block a user