Completes modal layout
This commit is contained in:
parent
b6ab0bdc53
commit
9fc189efce
|
@ -238,7 +238,7 @@ abstract class VectorBaseActivity<VB : ViewBinding> : AppCompatActivity(), Maver
|
||||||
|
|
||||||
initUiAndData()
|
initUiAndData()
|
||||||
|
|
||||||
window.statusBarColor = ContextCompat.getColor(this, android.R.color.white)
|
window.statusBarColor = ContextCompat.getColor(this, android.R.color.white, "somethingelse", "another thing", "awdawdwad", "awnoidwnadoinwaiodnawoindioawniodaw")
|
||||||
window.navigationBarColor = ContextCompat.getColor(this, android.R.color.white)
|
window.navigationBarColor = ContextCompat.getColor(this, android.R.color.white)
|
||||||
val titleRes = getTitleRes()
|
val titleRes = getTitleRes()
|
||||||
if (titleRes != -1) {
|
if (titleRes != -1) {
|
||||||
|
@ -262,15 +262,17 @@ abstract class VectorBaseActivity<VB : ViewBinding> : AppCompatActivity(), Maver
|
||||||
|
|
||||||
private fun handleGlobalError(globalError: GlobalError) {
|
private fun handleGlobalError(globalError: GlobalError) {
|
||||||
when (globalError) {
|
when (globalError) {
|
||||||
is GlobalError.InvalidToken ->
|
is GlobalError.InvalidToken ->
|
||||||
handleInvalidToken(globalError)
|
handleInvalidToken(globalError)
|
||||||
is GlobalError.ConsentNotGivenError ->
|
is GlobalError.ConsentNotGivenError ->
|
||||||
consentNotGivenHelper.displayDialog(globalError.consentUri,
|
consentNotGivenHelper.displayDialog(
|
||||||
activeSessionHolder.getActiveSession().sessionParams.homeServerHost ?: "")
|
globalError.consentUri,
|
||||||
is GlobalError.CertificateError ->
|
activeSessionHolder.getActiveSession().sessionParams.homeServerHost ?: ""
|
||||||
|
)
|
||||||
|
is GlobalError.CertificateError ->
|
||||||
handleCertificateError(globalError)
|
handleCertificateError(globalError)
|
||||||
GlobalError.ExpiredAccount -> Unit // TODO Handle account expiration
|
GlobalError.ExpiredAccount -> Unit // TODO Handle account expiration
|
||||||
is GlobalError.InitialSyncRequest -> handleInitialSyncRequest(globalError)
|
is GlobalError.InitialSyncRequest -> handleInitialSyncRequest(globalError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,11 +280,13 @@ abstract class VectorBaseActivity<VB : ViewBinding> : AppCompatActivity(), Maver
|
||||||
MaterialAlertDialogBuilder(this)
|
MaterialAlertDialogBuilder(this)
|
||||||
.setTitle(R.string.initial_sync_request_title)
|
.setTitle(R.string.initial_sync_request_title)
|
||||||
.setMessage(
|
.setMessage(
|
||||||
getString(R.string.initial_sync_request_content, getString(
|
getString(
|
||||||
|
R.string.initial_sync_request_content, getString(
|
||||||
when (initialSyncRequest.reason) {
|
when (initialSyncRequest.reason) {
|
||||||
InitialSyncRequestReason.IGNORED_USERS_LIST_CHANGE -> R.string.initial_sync_request_reason_unignored_users
|
InitialSyncRequestReason.IGNORED_USERS_LIST_CHANGE -> R.string.initial_sync_request_reason_unignored_users
|
||||||
}
|
}
|
||||||
))
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
.setPositiveButton(R.string.ok) { _, _ ->
|
.setPositiveButton(R.string.ok) { _, _ ->
|
||||||
MainActivity.restartApp(this, MainActivityArgs(clearCache = true))
|
MainActivity.restartApp(this, MainActivityArgs(clearCache = true))
|
||||||
|
@ -320,7 +324,8 @@ abstract class VectorBaseActivity<VB : ViewBinding> : AppCompatActivity(), Maver
|
||||||
|
|
||||||
mainActivityStarted = true
|
mainActivityStarted = true
|
||||||
|
|
||||||
MainActivity.restartApp(this,
|
MainActivity.restartApp(
|
||||||
|
this,
|
||||||
MainActivityArgs(
|
MainActivityArgs(
|
||||||
clearCredentials = !globalError.softLogout,
|
clearCredentials = !globalError.softLogout,
|
||||||
isUserLoggedOut = true,
|
isUserLoggedOut = true,
|
||||||
|
|
|
@ -8,22 +8,43 @@
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingBottom="16dp">
|
android:paddingBottom="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/header_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="?attr/vctr_content_tertiary"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:text="@string/choose_a_space"
|
||||||
|
android:textAllCaps="true" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/room_list"
|
android:id="@+id/room_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/header_text"
|
||||||
tools:itemCount="3"
|
tools:itemCount="3"
|
||||||
tools:listitem="@layout/item_modal_space" />
|
tools:listitem="@layout/item_modal_space" />
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:id="@+id/bottom_divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/room_list" />
|
||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
android:id="@+id/add_space_icon_background"
|
android:id="@+id/add_space_icon_background"
|
||||||
android:layout_width="42dp"
|
android:layout_width="42dp"
|
||||||
android:layout_height="42dp"
|
android:layout_height="42dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="16dp"
|
||||||
android:background="#4D8D97A5"
|
android:background="#4D8D97A5"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/room_list"
|
app:layout_constraintTop_toBottomOf="@id/bottom_divider"
|
||||||
app:shapeAppearanceOverlay="@style/SpaceListModalImageShapeOverlay" />
|
app:shapeAppearanceOverlay="@style/SpaceListModalImageShapeOverlay" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|
|
@ -3039,4 +3039,5 @@
|
||||||
<string name="screen_sharing_notification_title">${app_name} Screen Sharing</string>
|
<string name="screen_sharing_notification_title">${app_name} Screen Sharing</string>
|
||||||
<string name="screen_sharing_notification_description">Screen sharing is in progress</string>
|
<string name="screen_sharing_notification_description">Screen sharing is in progress</string>
|
||||||
<string name="all_chats">All Chats</string>
|
<string name="all_chats">All Chats</string>
|
||||||
|
<string name="choose_a_space">Choose a space</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue