From 9fc189efcec4b4a5c44ec5be1021fe7efb0c64ca Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Thu, 5 May 2022 12:37:36 +0200 Subject: [PATCH] Completes modal layout --- .../app/core/platform/VectorBaseActivity.kt | 25 ++++++++++------- .../res/layout/fragment_space_list_modal.xml | 27 ++++++++++++++++--- vector/src/main/res/values/strings.xml | 1 + 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt b/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt index f2d750247a..7d5827be51 100644 --- a/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt +++ b/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt @@ -238,7 +238,7 @@ abstract class VectorBaseActivity : AppCompatActivity(), Maver 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) val titleRes = getTitleRes() if (titleRes != -1) { @@ -262,15 +262,17 @@ abstract class VectorBaseActivity : AppCompatActivity(), Maver private fun handleGlobalError(globalError: GlobalError) { when (globalError) { - is GlobalError.InvalidToken -> + is GlobalError.InvalidToken -> handleInvalidToken(globalError) is GlobalError.ConsentNotGivenError -> - consentNotGivenHelper.displayDialog(globalError.consentUri, - activeSessionHolder.getActiveSession().sessionParams.homeServerHost ?: "") - is GlobalError.CertificateError -> + consentNotGivenHelper.displayDialog( + globalError.consentUri, + activeSessionHolder.getActiveSession().sessionParams.homeServerHost ?: "" + ) + is GlobalError.CertificateError -> handleCertificateError(globalError) - GlobalError.ExpiredAccount -> Unit // TODO Handle account expiration - is GlobalError.InitialSyncRequest -> handleInitialSyncRequest(globalError) + GlobalError.ExpiredAccount -> Unit // TODO Handle account expiration + is GlobalError.InitialSyncRequest -> handleInitialSyncRequest(globalError) } } @@ -278,11 +280,13 @@ abstract class VectorBaseActivity : AppCompatActivity(), Maver MaterialAlertDialogBuilder(this) .setTitle(R.string.initial_sync_request_title) .setMessage( - getString(R.string.initial_sync_request_content, getString( + getString( + R.string.initial_sync_request_content, getString( when (initialSyncRequest.reason) { InitialSyncRequestReason.IGNORED_USERS_LIST_CHANGE -> R.string.initial_sync_request_reason_unignored_users } - )) + ) + ) ) .setPositiveButton(R.string.ok) { _, _ -> MainActivity.restartApp(this, MainActivityArgs(clearCache = true)) @@ -320,7 +324,8 @@ abstract class VectorBaseActivity : AppCompatActivity(), Maver mainActivityStarted = true - MainActivity.restartApp(this, + MainActivity.restartApp( + this, MainActivityArgs( clearCredentials = !globalError.softLogout, isUserLoggedOut = true, diff --git a/vector/src/main/res/layout/fragment_space_list_modal.xml b/vector/src/main/res/layout/fragment_space_list_modal.xml index 3228c200ec..c561094a70 100644 --- a/vector/src/main/res/layout/fragment_space_list_modal.xml +++ b/vector/src/main/res/layout/fragment_space_list_modal.xml @@ -8,22 +8,43 @@ android:paddingTop="16dp" android:paddingBottom="16dp"> + + + + ${app_name} Screen Sharing Screen sharing is in progress All Chats + Choose a space