Skip to content

Add About section to Settings; bump version to 1.0.1#9

Merged
benju69 merged 3 commits into
mainfrom
copilot/add-about-section-settings
May 8, 2026
Merged

Add About section to Settings; bump version to 1.0.1#9
benju69 merged 3 commits into
mainfrom
copilot/add-about-section-settings

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Settings screen lacked any app info or support contact. Adds an About section below the existing Dark Mode toggle with three rows.

Changes

feature/settings

  • Contact Support — clickable row firing ACTION_SENDTOmailto:begonin@gmail.com
  • Support me — clickable row firing ACTION_VIEWhttps://benju.fr/support.html
  • Version — non-clickable row; version name resolved dynamically via PackageManager rather than hardcoded
  • All external launches and getPackageInfo wrapped in runCatching to handle missing app/browser gracefully
  • New strings added to all 5 locales (en, fr, de, es, it); settings_version reduced to label-only

app/build.gradle.kts

  • versionCode 1 → 2, versionName 1.0.01.0.1

… and Version rows; bump version to 1.0.1

Agent-Logs-Url: https://github.com/benju69/Tasks/sessions/dcee19e7-1a70-4b30-a438-e9a119ccf90e

Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an About section to the Settings screen with support links and a dynamically-resolved app version, and bumps the app version to 1.0.1.

Changes:

  • Adds “About” section rows for Contact Support, Support me, and Version in SettingsScreen.
  • Updates localized string resources (en/fr/de/es/it) to support the new About section and makes settings_version label-only.
  • Bumps versionCode and versionName in the app Gradle config.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
feature/settings/src/main/res/values/strings.xml Adds About-section strings and changes version string to a label.
feature/settings/src/main/res/values-it/strings.xml Adds About-section strings and changes version string to a label (IT).
feature/settings/src/main/res/values-fr/strings.xml Adds About-section strings and changes version string to a label (FR).
feature/settings/src/main/res/values-es/strings.xml Adds About-section strings and changes version string to a label (ES).
feature/settings/src/main/res/values-de/strings.xml Adds About-section strings and changes version string to a label (DE).
feature/settings/src/main/java/fr/benju/tasks/feature/settings/SettingsScreen.kt Implements About section UI, external intents, and dynamic version lookup.
app/build.gradle.kts Bumps app version to 1.0.1 / versionCode 2.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +94 to +96
val intent = Intent(Intent.ACTION_SENDTO).apply {
data = Uri.parse("mailto:begonin@gmail.com")
}
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The support email address is hardcoded in the UI code. For easier future updates (and to keep UI strings/config in one place), consider moving this address into a string resource or a small constants file (and building the mailto: Uri from it).

Copilot uses AI. Check for mistakes.
Comment on lines +111 to +113
.clickable {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://benju.fr/support.html"))
runCatching { context.startActivity(intent) }
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The support URL is hardcoded in the UI code. Consider moving it to a string resource or constant (possibly per build variant) so it can be updated without touching UI logic.

Copilot uses AI. Check for mistakes.
Comment on lines +135 to +137
val versionName = runCatching {
context.packageManager.getPackageInfo(context.packageName, 0).versionName.orEmpty()
}.getOrDefault("")
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

versionName is computed by calling PackageManager.getPackageInfo(...) directly in the composable body, which will re-run on every recomposition. Cache this (e.g., with remember/produceState) so it’s only resolved once per composition (or when context.packageName changes).

Copilot uses AI. Check for mistakes.
style = MaterialTheme.typography.bodyMedium
)
val versionName = runCatching {
context.packageManager.getPackageInfo(context.packageName, 0).versionName.orEmpty()
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With compileSdk = 36, PackageManager.getPackageInfo(String, Int) is deprecated. Use the newer flags-based API on API 33+ (and fall back to the legacy call on older SDKs) to avoid deprecation warnings and keep the code aligned with current Android APIs.

Suggested change
context.packageManager.getPackageInfo(context.packageName, 0).versionName.orEmpty()
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.TIRAMISU) {
context.packageManager.getPackageInfo(
context.packageName,
android.content.pm.PackageManager.PackageInfoFlags.of(0)
).versionName.orEmpty()
} else {
@Suppress("DEPRECATION")
context.packageManager.getPackageInfo(context.packageName, 0).versionName.orEmpty()
}

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +11
<string name="settings_contact_support">Contact Support</string>
<string name="settings_support_me">Support me</string>
<string name="settings_version">Version</string>
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalization is inconsistent with the other Settings strings (e.g., "Dark Mode", "Contact Support" are title case). Update this string to match the established casing.

Copilot uses AI. Check for mistakes.
Comment on lines +91 to +99
modifier = Modifier
.fillMaxWidth()
.clickable {
val intent = Intent(Intent.ACTION_SENDTO).apply {
data = Uri.parse("mailto:begonin@gmail.com")
}
runCatching { context.startActivity(intent) }
}
.padding(vertical = 12.dp),
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this modifier chain, .padding(vertical = 12.dp) comes after .clickable { ... }, which means the padded area will not be part of the tappable/clickable hit target. Reorder modifiers so the padding is applied before clickable (or move clickable to be the outermost modifier) to ensure the full row (including padding) is clickable.

Copilot uses AI. Check for mistakes.
Comment on lines +109 to +116
modifier = Modifier
.fillMaxWidth()
.clickable {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://benju.fr/support.html"))
runCatching { context.startActivity(intent) }
}
.padding(vertical = 12.dp),
verticalAlignment = Alignment.CenterVertically
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: .padding(vertical = 12.dp) is applied after .clickable { ... }, so the padded area won't be clickable. Reorder the modifiers so the padding is inside the clickable surface (e.g., apply padding before clickable).

Copilot uses AI. Check for mistakes.
@benju69 benju69 merged commit 8d32733 into main May 8, 2026
1 check passed
@benju69 benju69 deleted the copilot/add-about-section-settings branch May 8, 2026 20:46
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

📦 Debug APK ready

Download app-debug.apk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants