mirror of
https://github.com/pawelorzech/Swoosh.git
synced 2026-03-31 11:55:47 +00:00
feat: show app version in Settings, fix composer NPE crash, bump to v0.2.0
- Settings: shows "Swoosh v0.2.0" at bottom - Fix: NPE crash in composer error display (AnimatedVisibility exit) - Version bumped to 0.2.0 (versionCode 2) - CLAUDE.md: added versioning process documentation
This commit is contained in:
parent
dcb9c50c02
commit
ccd729e82f
4 changed files with 33 additions and 3 deletions
17
CLAUDE.md
17
CLAUDE.md
|
|
@ -41,3 +41,20 @@ MVVM with Repository pattern, single-module Gradle project.
|
|||
- **Credentials:** Stored in `EncryptedSharedPreferences` (AES256-GCM) via `CredentialsManager`
|
||||
- **API client:** Base URL is configured at runtime during setup; `ApiClient` rebuilds Retrofit instance when URL changes
|
||||
- **Min SDK 26, Target/Compile SDK 34, Kotlin 1.9.22, Java 17**
|
||||
|
||||
## Versioning
|
||||
|
||||
Version is defined in `app/build.gradle.kts` (`versionCode` and `versionName`).
|
||||
|
||||
- **Format:** Semantic versioning `MAJOR.MINOR.PATCH` (e.g., `0.2.0`)
|
||||
- **`versionCode`:** Integer, increment by 1 on every release (used by Google Play)
|
||||
- **`versionName`:** Human-readable, shown in Settings screen
|
||||
|
||||
**When to bump:**
|
||||
- **PATCH** (0.2.0 → 0.2.1): Bug fixes, small tweaks, no new features
|
||||
- **MINOR** (0.2.0 → 0.3.0): New features, UI changes, significant improvements
|
||||
- **MAJOR** (0.x → 1.0): First stable public release
|
||||
|
||||
**Current:** `versionName = "0.2.0"`, `versionCode = 2`
|
||||
|
||||
**Process:** When making a release commit, bump both `versionCode` (+1) and `versionName` in `app/build.gradle.kts`. Always bump version when creating a release build or PR.
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ android {
|
|||
applicationId = "com.swoosh.microblog"
|
||||
minSdk = 26
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
versionCode = 2
|
||||
versionName = "0.2.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables { useSupportLibrary = true }
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ fun ComposerScreen(
|
|||
Column {
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
Text(
|
||||
text = state.error!!,
|
||||
text = state.error ?: "",
|
||||
color = MaterialTheme.colorScheme.error,
|
||||
style = MaterialTheme.typography.bodySmall
|
||||
)
|
||||
|
|
|
|||
|
|
@ -141,6 +141,19 @@ fun SettingsScreen(
|
|||
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
|
||||
// App version
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)
|
||||
Text(
|
||||
text = "Swoosh v${packageInfo.versionName}",
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
textAlign = androidx.compose.ui.text.style.TextAlign.Center
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
// Disconnect all
|
||||
if (accountManager.getAccounts().size > 1) {
|
||||
TextButton(
|
||||
|
|
|
|||
Loading…
Reference in a new issue