From 538f51e2d2e939f89452555ee28db7dbc62cfac0 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 9 Dec 2021 13:45:21 +0000 Subject: [PATCH] adds a debug menu entry point in the splash debug info --- .../java/im/vector/app/features/login/LoginSplashFragment.kt | 2 ++ .../login2/LoginSplashSignUpSignInSelectionFragment2.kt | 1 + vector/src/main/res/layout/fragment_login_splash.xml | 3 +++ vector/src/main/res/layout/fragment_login_splash_2.xml | 3 +++ 4 files changed, 9 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/login/LoginSplashFragment.kt b/vector/src/main/java/im/vector/app/features/login/LoginSplashFragment.kt index dd0bfc0ed6..3430ba28f2 100644 --- a/vector/src/main/java/im/vector/app/features/login/LoginSplashFragment.kt +++ b/vector/src/main/java/im/vector/app/features/login/LoginSplashFragment.kt @@ -25,6 +25,7 @@ import androidx.core.view.isVisible import com.google.android.material.dialog.MaterialAlertDialogBuilder import im.vector.app.BuildConfig import im.vector.app.R +import im.vector.app.core.epoxy.onClick import im.vector.app.databinding.FragmentLoginSplashBinding import im.vector.app.features.settings.VectorPreferences import org.matrix.android.sdk.api.failure.Failure @@ -57,6 +58,7 @@ class LoginSplashFragment @Inject constructor( views.loginSplashVersion.text = "Version : ${BuildConfig.VERSION_NAME}\n" + "Branch: ${BuildConfig.GIT_BRANCH_NAME}\n" + "Build: ${BuildConfig.BUILD_NUMBER}" + views.loginSplashVersion.debouncedClicks { navigator.openDebug(requireContext()) } } } diff --git a/vector/src/main/java/im/vector/app/features/login2/LoginSplashSignUpSignInSelectionFragment2.kt b/vector/src/main/java/im/vector/app/features/login2/LoginSplashSignUpSignInSelectionFragment2.kt index 6cfebf776a..db6e86250b 100644 --- a/vector/src/main/java/im/vector/app/features/login2/LoginSplashSignUpSignInSelectionFragment2.kt +++ b/vector/src/main/java/im/vector/app/features/login2/LoginSplashSignUpSignInSelectionFragment2.kt @@ -55,6 +55,7 @@ class LoginSplashSignUpSignInSelectionFragment2 @Inject constructor( views.loginSplashVersion.text = "Version : ${BuildConfig.VERSION_NAME}\n" + "Branch: ${BuildConfig.GIT_BRANCH_NAME}\n" + "Build: ${BuildConfig.BUILD_NUMBER}" + views.loginSplashVersion.debouncedClicks { navigator.openDebug(requireContext()) } } } diff --git a/vector/src/main/res/layout/fragment_login_splash.xml b/vector/src/main/res/layout/fragment_login_splash.xml index 96b3a7cbfb..90c375dcdb 100644 --- a/vector/src/main/res/layout/fragment_login_splash.xml +++ b/vector/src/main/res/layout/fragment_login_splash.xml @@ -202,8 +202,11 @@ style="@style/Widget.Vector.TextView.Caption" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:drawablePadding="12dp" android:textColor="?vctr_content_secondary" android:visibility="gone" + app:drawableStartCompat="@drawable/ic_debug_icon" + app:drawableTint="?colorPrimary" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" tools:text="@string/settings_version" diff --git a/vector/src/main/res/layout/fragment_login_splash_2.xml b/vector/src/main/res/layout/fragment_login_splash_2.xml index 33f8399c16..b7010ba4da 100644 --- a/vector/src/main/res/layout/fragment_login_splash_2.xml +++ b/vector/src/main/res/layout/fragment_login_splash_2.xml @@ -219,8 +219,11 @@ style="@style/Widget.Vector.TextView.Caption" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:drawablePadding="12dp" android:textColor="?vctr_content_secondary" android:visibility="gone" + app:drawableStartCompat="@drawable/ic_debug_icon" + app:drawableTint="?colorPrimary" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" tools:text="@string/settings_version"