From 20c425b57a55ed806ff1f309465c0952e73923dd Mon Sep 17 00:00:00 2001 From: "Daniel W. Steinbrook" Date: Thu, 3 Oct 2024 17:22:02 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: RDMurray --- apps/ios/GuideDogs/Code/App/Settings/SettingsContext.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/ios/GuideDogs/Code/App/Settings/SettingsContext.swift b/apps/ios/GuideDogs/Code/App/Settings/SettingsContext.swift index 0b2d490b..ef9ebd95 100644 --- a/apps/ios/GuideDogs/Code/App/Settings/SettingsContext.swift +++ b/apps/ios/GuideDogs/Code/App/Settings/SettingsContext.swift @@ -380,8 +380,8 @@ class SettingsContext { } set { userDefaults.set(newValue, forKey: Keys.leaveImmediateVicinityDistance) - // Ensure leave is always 10m greater than enter - userDefaults.set(newValue - 15.0, forKey: Keys.enterImmediateVicinityDistance) + // Ensure leave is always 15m greater than enter + userDefaults.set(max(newValue - 15.0, 0.0), forKey: Keys.enterImmediateVicinityDistance) } }