mirror of
https://github.com/bleackstorm/satiea.git
synced 2026-12-03 07:41:56 +01:00
feat: support meal photo URIs and improve UI events
- Add `photoUris` field to `MealEntry` and update Firestore rules. - Implement `UiEvent` handling in `MainActivity` for navigation/links. - Remove sensitive email data from error logs and clean up manifest.
This commit is contained in:
1 parent
f0487453c9
commit
87bbb448c2
34 files changed
+2026
-1170
No files matched your search
@@ -45,8 +45,9 @@ import androidx.compose.material3.CircularProgressIndicator
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.example.ui.journal.GoogleSheetsUiState
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.time.Instant
|
||||
import java.time.ZoneId
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.Locale
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
@@ -357,8 +358,8 @@ fun SettingsScreen(
|
||||
}
|
||||
}
|
||||
is GoogleSheetsUiState.Success -> {
|
||||
val timeStr = SimpleDateFormat("dd/MM/yyyy à HH:mm", Locale.FRENCH)
|
||||
.format(Date(sheetsUiState.timestamp))
|
||||
val timeStr = DateTimeFormatter.ofPattern("dd/MM/yyyy 'à' HH:mm", Locale.FRENCH)
|
||||
.format(Instant.ofEpochMilli(sheetsUiState.timestamp).atZone(ZoneId.systemDefault()))
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
@@ -884,16 +885,7 @@ fun SettingsScreen(
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
Button(
|
||||
onClick = {
|
||||
Firebase.auth.signOut()
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
try {
|
||||
val credManager = CredentialManager.create(context)
|
||||
credManager.clearCredentialState(ClearCredentialStateRequest())
|
||||
} catch (_: Exception) {}
|
||||
}
|
||||
onSignOut()
|
||||
},
|
||||
onClick = onSignOut,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.testTag("signout_button"),
|
||||
|
||||
Reference in new issue
Block a user