Closed bjornoleh closed 1 year ago
Settings are uploaded by the function
func hideSettingsModal() {
nightscoutManager.uploadProfile()
hideModal()
}
This is activated by tapping the "Close" button in main settings view:
.navigationBarItems(leading: Button("Close", action: state.hideSettingsModal))
I suppose we need to make this happen with a swipe down too, or change the logic related to profile uploads.
In dev, the upload and hideSettingsModal function has been changed a bit: https://github.com/Artificial-Pancreas/iAPS/blob/5f4e1a958ef122fc0ab838ed76bdad8d73b8cd6e/FreeAPS/Sources/Modules/Settings/SettingsStateModel.swift#L49-L56
I had a look, but could not get the native swipe down action to upload settings. Will need to hand it over to someone else.
Fixed in dev!
If I make a change to e.g DIA in iAPS Pump Settings, and Save on Pump, then go back to main settings screen and tap "Close" in upper left hand corner, the changed DIA gets uploaded to NS profiles.
However, if I instead after Save on Pump directly close Pump Settings by swiping down, or go to main settings and then swipe down, DIA is not uploaded to NS profiles. If I go back into main settings and tap "Close", the change is uploaded to NS.
The same holds for changes to ISF and CR.
We should check the condition that forces the upload. Obviously, tapping "Close" and swiping down is not the same in this context. Both should do the same, of course.