Fixes not requiring PIN if the app is forced closed (#773)

## Description
Checks if a PIN is needed when restoring the previous session

### Related issues
Addresses
https://github.com/damontecres/Wholphin/issues/321#issuecomment-3797445005
This commit is contained in:
Ray 2026-01-26 15:07:27 -05:00 committed by GitHub
parent 03871579f5
commit 7c985ae2ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -417,8 +417,12 @@ class MainActivityViewModel
prefs.currentUserId?.toUUIDOrNull(),
)
if (current != null) {
// Restored
navigationManager.navigateTo(SetupDestination.AppContent(current))
if (current.user.hasPin) {
navigationManager.navigateTo(SetupDestination.UserList(current.server))
} else {
// Restored
navigationManager.navigateTo(SetupDestination.AppContent(current))
}
} else {
// Did not restore
navigationManager.navigateTo(SetupDestination.ServerList)