diff --git a/CHANGELOG.md b/CHANGELOG.md index 279c5d6..0ee9b9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,15 @@ ## Versión actual -- Versión base: `1.2.4` +- Versión base: `1.2.5` ## Historial +### 1.2.5 - 2026-04-23 + +- Android vuelve a bloquearse al pasar a segundo plano cuando la biometría está activa, para que al regresar sí pida huella. +- Se publica APK nuevo con versión visible `1.2.5`. + ### 1.2.4 - 2026-04-23 - Android corrige el cierre de sesión para volver a ofrecer la pantalla biométrica cuando existen credenciales biométricas guardadas. diff --git a/VERSION b/VERSION index e8ea05d..c813fe1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.4 +1.2.5 diff --git a/android/app/build.gradle b/android/app/build.gradle index 769aa29..58b9abc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -18,8 +18,8 @@ android { applicationId "net.linkedcorp.linkedsign" minSdk 26 targetSdk 35 - versionCode 10204 - versionName "1.2.4" + versionCode 10205 + versionName "1.2.5" buildConfigField "String", "API_BASE_URL", "\"${apiBaseUrl}\"" } diff --git a/android/app/src/main/java/net/linkedcorp/linkedsign/ui/LinkedSignApp.kt b/android/app/src/main/java/net/linkedcorp/linkedsign/ui/LinkedSignApp.kt index 0146a70..3e81eb4 100644 --- a/android/app/src/main/java/net/linkedcorp/linkedsign/ui/LinkedSignApp.kt +++ b/android/app/src/main/java/net/linkedcorp/linkedsign/ui/LinkedSignApp.kt @@ -95,6 +95,7 @@ import androidx.compose.material3.TopAppBar import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.IconButton import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -113,6 +114,9 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.LocalContext +import androidx.lifecycle.Lifecycle +import androidx.lifecycle.LifecycleEventObserver +import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.input.PasswordVisualTransformation @@ -209,6 +213,7 @@ fun LinkedSignApp(viewModel: MainViewModel, appContext: Context, activity: Compo var selectedTab by rememberSaveable { mutableStateOf(AppTab.Documents) } var pendingSignDocumentId by rememberSaveable { mutableStateOf(null) } val biometricAvailable = remember(activity) { canUseBiometricAccess(activity) } + val lifecycleOwner = LocalLifecycleOwner.current var appUnlocked by rememberSaveable { mutableStateOf(false) } var bootstrapGateHandled by rememberSaveable { mutableStateOf(false) } var showBiometricOptIn by rememberSaveable { mutableStateOf(false) } @@ -235,6 +240,23 @@ fun LinkedSignApp(viewModel: MainViewModel, appContext: Context, activity: Compo } } + DisposableEffect(lifecycleOwner, biometricAvailable, state.biometricEnabled, state.biometricHasCredentials) { + val observer = LifecycleEventObserver { _, event -> + if (event == Lifecycle.Event.ON_STOP && + biometricAvailable && + state.biometricEnabled && + state.biometricHasCredentials + ) { + appUnlocked = false + } + } + + lifecycleOwner.lifecycle.addObserver(observer) + onDispose { + lifecycleOwner.lifecycle.removeObserver(observer) + } + } + Scaffold( modifier = Modifier.pointerInput(state.authenticated) { if (!state.authenticated) return@pointerInput diff --git a/backend/package.json b/backend/package.json index 5506159..a8565e6 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "linkedsign-backend", - "version": "1.2.4", + "version": "1.2.5", "private": true, "description": "Initial backend for LinkedSign", "main": "src/server.js", diff --git a/frontend/package.json b/frontend/package.json index bf890f3..4cfaa0e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "frontend", "private": true, - "version": "1.2.4", + "version": "1.2.5", "type": "module", "scripts": { "dev": "vite",