From f2cd0166ff6258e1f0a1c377d287ee4c93a70801 Mon Sep 17 00:00:00 2001 From: Philoul Date: Wed, 4 Oct 2023 08:59:34 +0200 Subject: [PATCH] Fix ProfileSwitch TimeShift option sent from watch --- .../app/aaps/implementation/profile/ProfileFunctionImpl.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/implementation/src/main/kotlin/app/aaps/implementation/profile/ProfileFunctionImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/profile/ProfileFunctionImpl.kt index 94d8603af7..b448214159 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/profile/ProfileFunctionImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/profile/ProfileFunctionImpl.kt @@ -179,7 +179,7 @@ class ProfileFunctionImpl @Inject constructor( override fun createProfileSwitch(durationInMinutes: Int, percentage: Int, timeShiftInHours: Int): Boolean { val profile = repository.getPermanentProfileSwitch(dateUtil.now()) ?: return false val profileStore = activePlugin.activeProfileSource.profile ?: return false - val ps = buildProfileSwitch(profileStore, profile.profileName, durationInMinutes, percentage, 0, dateUtil.now()) ?: return false + val ps = buildProfileSwitch(profileStore, profile.profileName, durationInMinutes, percentage, timeShiftInHours, dateUtil.now()) ?: return false val validity = ProfileSealed.PS(ps).isValid( rh.gs(app.aaps.core.ui.R.string.careportal_profileswitch), activePlugin.activePump,