mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-19 10:45:13 +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
|
||||||
|
@ -284,7 +284,7 @@ class ConversationsListView : BaseView() {
|
|||||||
|
|
||||||
return items
|
return items
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onFloatingActionButtonClick() {
|
override fun onFloatingActionButtonClick() {
|
||||||
router?.pushController(
|
router?.pushController(
|
||||||
RouterTransaction.with(ContactsView<Any>())
|
RouterTransaction.with(ContactsView<Any>())
|
||||||
|
Loading…
Reference in New Issue
Block a user