Security locks work independently; other-account avatars flush right in the avatar menu

Login lock, lock account switching and lock hidden files no longer depend on
each other: passGate prompts on its own flag, the two sub-locks can be set
with login lock off, and disabling login lock leaves them alone. Turning any
lock on or off asks for device auth (on also checks the device can). The iOS
Share Extension's unlock rules follow. The avatar dropdown's additional
accounts lose the 44px spacer so their avatars sit at the right edge.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Ayushya Amitabh
2026-10-06 20:07:28 -04:00
co-authored by Claude Sonnet 5.5
parent 27c8ac12f2
commit 22a6602f08
10 changed files with 323 additions and 55 deletions
+5 -4
View File
@@ -23,8 +23,9 @@ struct SharedAccount: Codable, Equatable, Identifiable {
struct SharedAccounts: Codable, Equatable {
var accounts: [SharedAccount]
var activeId: String?
/// Settings -> Security: the master "login lock" and its two sub-toggles.
/// The sub-toggles only count while the master one is on (as in the app).
/// Settings -> Security: the three independent locks. `loginLockEnabled`
/// (unlock to open the app) is carried for completeness; the extension's own
/// gates are the other two.
var loginLockEnabled: Bool
var lockAccountSwitching: Bool
var lockHiddenFiles: Bool
@@ -36,11 +37,11 @@ struct SharedAccounts: Codable, Equatable {
/// Uploading to an account other than the active one is "switching" in
/// the app's terms, so it needs the same unlock.
var needsUnlockToSwitchAccount: Bool { loginLockEnabled && lockAccountSwitching }
var needsUnlockToSwitchAccount: Bool { lockAccountSwitching }
/// Showing hidden folders needs the same unlock the app asks for when you
/// turn hidden files on.
var needsUnlockForHidden: Bool { loginLockEnabled && lockHiddenFiles }
var needsUnlockForHidden: Bool { lockHiddenFiles }
}
/// Keeps the [SharedAccounts] in a Keychain access group both the app and the