mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-04 13:07:31 +01:00
Restore waiting view management
This commit is contained in:
parent
4ddc8e706d
commit
aa0a851b35
@ -74,10 +74,10 @@ abstract class SimpleFragmentActivity : VectorBaseActivity<ActivityBinding>() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun showWaitingView() {
|
||||
override fun showWaitingView(text: String?) {
|
||||
hideKeyboard()
|
||||
views.waitingView.waitingStatusText.isGone = views.waitingView.waitingStatusText.text.isNullOrBlank()
|
||||
super.showWaitingView()
|
||||
super.showWaitingView(text)
|
||||
}
|
||||
|
||||
override fun hideWaitingView() {
|
||||
|
@ -24,6 +24,7 @@ import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.AttrRes
|
||||
import androidx.annotation.CallSuper
|
||||
import androidx.annotation.MainThread
|
||||
@ -56,6 +57,7 @@ import im.vector.app.core.extensions.observeEvent
|
||||
import im.vector.app.core.extensions.observeNotNull
|
||||
import im.vector.app.core.extensions.registerStartForActivityResult
|
||||
import im.vector.app.core.extensions.restart
|
||||
import im.vector.app.core.extensions.setTextOrHide
|
||||
import im.vector.app.core.extensions.vectorComponent
|
||||
import im.vector.app.core.utils.toast
|
||||
import im.vector.app.features.MainActivity
|
||||
@ -520,10 +522,13 @@ abstract class VectorBaseActivity<VB: ViewBinding> : AppCompatActivity(), HasScr
|
||||
fun isWaitingViewVisible() = waitingView?.isVisible == true
|
||||
|
||||
/**
|
||||
* Show the waiting view
|
||||
* Show the waiting view, and set text if not null.
|
||||
*/
|
||||
open fun showWaitingView() {
|
||||
open fun showWaitingView(text: String? = null) {
|
||||
waitingView?.isVisible = true
|
||||
if (text != null) {
|
||||
waitingView?.findViewById<TextView>(R.id.waitingStatusText)?.setTextOrHide(text)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1294,11 +1294,7 @@ class RoomDetailFragment @Inject constructor(
|
||||
when (async) {
|
||||
is Loading -> {
|
||||
// TODO Better handling progress
|
||||
/* TODO BMA Yes, improve that
|
||||
vectorBaseActivity.showWaitingView()
|
||||
vectorBaseActivity.waitingStatusText.visibility = View.VISIBLE
|
||||
vectorBaseActivity.waitingStatusText.text = getString(R.string.joining_room)
|
||||
*/
|
||||
vectorBaseActivity.showWaitingView(getString(R.string.joining_room))
|
||||
}
|
||||
is Success -> {
|
||||
navigator.openRoom(vectorBaseActivity, async())
|
||||
|
Loading…
x
Reference in New Issue
Block a user