Me tab: authState read via unsafe cast, should be reactive StateFlow #41
Labels
No labels
auth
bug
composer
correctness
database
durability
enhancement
feeds
interactions
notifications
performance
reliability
safety
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starsetbyte/peregrine#41
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
PeregrineNavHost.ktMe tab reads own DID via(authState as? AuthState.Authenticated)?.did— a one-shot cast in a composable, not a reactive flow. If authState changes after composition, the DID is stale.Fix
Added
ownDid: StateFlow<String?>toAppViewModelthat maps fromauthState. PeregrineNavHost now usesappViewModel.ownDid.collectAsStateWithLifecycle()with a local val for smart-cast safety.Fixed in PR #36.