From b5cb336b8170cebb3341cbe6ba75bfa0c094bb36 Mon Sep 17 00:00:00 2001 From: ardevd Date: Sun, 8 Feb 2026 21:12:14 +0100 Subject: [PATCH 1/3] refactor: added version info to settings sheet --- app/build.gradle.kts | 1 + .../settings/ui/SettingsBottomSheet.kt | 5 ++++ app/src/main/res/layout/fragment_settings.xml | 29 +++++++++++++------ 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 7a44556..a01b9db 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -38,6 +38,7 @@ android { } buildFeatures { viewBinding = true + buildConfig = true } } diff --git a/app/src/main/java/net/ardevd/tagius/features/settings/ui/SettingsBottomSheet.kt b/app/src/main/java/net/ardevd/tagius/features/settings/ui/SettingsBottomSheet.kt index 291bd51..39d55f2 100644 --- a/app/src/main/java/net/ardevd/tagius/features/settings/ui/SettingsBottomSheet.kt +++ b/app/src/main/java/net/ardevd/tagius/features/settings/ui/SettingsBottomSheet.kt @@ -4,6 +4,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import net.ardevd.tagius.BuildConfig import androidx.lifecycle.lifecycleScope import com.google.android.material.bottomsheet.BottomSheetDialogFragment import kotlinx.coroutines.flow.first @@ -26,6 +27,10 @@ class SettingsBottomSheet( override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + // Show version info + val version = BuildConfig.VERSION_NAME + binding.versionText.text = "v$version" + // Display the stored URL so the user knows which server they are on viewLifecycleOwner.lifecycleScope.launch { val url = TokenManager(requireContext()).serverUrlFlow.first() diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index fd75b09..e9a68f1 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -1,6 +1,5 @@ - @@ -49,12 +48,12 @@ android:id="@+id/serverUrlText" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="https://timetagger.app" - android:textAppearance="?attr/textAppearanceBodyLarge" - android:textStyle="bold" android:layout_marginTop="4dp" android:ellipsize="end" - android:maxLines="1" /> + android:maxLines="1" + android:text="https://timetagger.app" + android:textAppearance="?attr/textAppearanceBodyLarge" + android:textStyle="bold" /> @@ -67,7 +66,19 @@ android:layout_marginTop="32dp" android:text="@string/settings_log_out" app:icon="@drawable/ic_logout" - app:layout_constraintTop_toBottomOf="@id/serverCard" - app:layout_constraintBottom_toBottomOf="parent" /> + app:layout_constraintTop_toBottomOf="@id/serverCard" /> + + \ No newline at end of file From 16dfece5fac8d1a418f862de068909228f6eb55b Mon Sep 17 00:00:00 2001 From: ardevd Date: Sun, 8 Feb 2026 21:36:46 +0100 Subject: [PATCH 2/3] Update app/src/main/res/layout/fragment_settings.xml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- app/src/main/res/layout/fragment_settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index e9a68f1..a97b350 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -51,7 +51,7 @@ android:layout_marginTop="4dp" android:ellipsize="end" android:maxLines="1" - android:text="https://timetagger.app" + android:text="@string/login_server_url_default" android:textAppearance="?attr/textAppearanceBodyLarge" android:textStyle="bold" /> From bfb5aab8d223611513c43a42bd3e51e9a552f02f Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 21:40:03 +0100 Subject: [PATCH 3/3] [WIP] Address feedback on version info in settings sheet (#43) --- app/src/main/res/layout/fragment_settings.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index a97b350..3cd76e9 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -1,6 +1,7 @@ @@ -73,12 +74,12 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:text="v1.0.0" android:textAppearance="?attr/textAppearanceBodySmall" android:textColor="?attr/colorOutline" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/logoutButton" /> + app:layout_constraintTop_toBottomOf="@id/logoutButton" + tools:text="v1.0.0" /> \ No newline at end of file