mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-23 05:29:54 +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 ->
|
operationState.observe(this@ContactsView) { operationState ->
|
||||||
when (operationState.operationState) {
|
when (operationState.operationState) {
|
||||||
ContactsViewOperationState.OK -> {
|
ContactsViewOperationState.OK -> {
|
||||||
|
searchLayout?.searchProgressBar?.isVisible = true
|
||||||
val bundle = Bundle()
|
val bundle = Bundle()
|
||||||
if (!hasToken || isNewGroupConversation) {
|
if (!hasToken || isNewGroupConversation) {
|
||||||
bundle.putString(BundleKeys.KEY_CONVERSATION_TOKEN, operationState.conversationToken)
|
bundle.putString(BundleKeys.KEY_CONVERSATION_TOKEN, operationState.conversationToken)
|
||||||
@ -165,10 +166,11 @@ class ContactsView<T : Any>(private val bundle: Bundle? = null) : BaseView() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ContactsViewOperationState.PROCESSING -> {
|
ContactsViewOperationState.PROCESSING -> {
|
||||||
// show progress bar and disable everything
|
searchLayout?.searchProgressBar?.isVisible = true
|
||||||
}
|
}
|
||||||
ContactsViewOperationState.CONVERSATION_CREATION_FAILED -> {
|
ContactsViewOperationState.CONVERSATION_CREATION_FAILED -> {
|
||||||
// dunno what to do yet, an error message somewhere
|
// dunno what to do yet, an error message somewhere
|
||||||
|
searchLayout?.searchProgressBar?.isVisible = false
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
// do nothing, we're waiting
|
// do nothing, we're waiting
|
||||||
|
Loading…
Reference in New Issue
Block a user