Conversation
…r host identifier and version
Translations
Updated translations from Lokalise on Thu Feb 9 13:30:18 CST 2023
…-service Remote PR Set #2: Introduce RemoteCommands
…-command-service Revert "Remote PR Set #2: Introduce RemoteCommands"
Upload automation status for temp and normal basals.
Updated translations from Lokalise on Sat Mar 18 15:11:44 CDT 2023
Updated translations
Basal rate fixes, and tests passing.
* Updating to new TidepoolKit with keycloak based auth * SettingsView using TidepoolService as ObservedObject * Tweak logo size * Fix issues with state restoration and re-logging in. Add alert when session loss is detected * Improve DataSetId caching * Do not allow environment switching when logged in * Tweak wording
| // var datumOrigin: TOrigin { | ||
| // return datumOrigin(for: resolvedIdentifier) | ||
| // } | ||
| // | ||
| // func datumOrigin<T: TypedDatum>(for type: T.Type) -> TOrigin { | ||
| // return datumOrigin(for: resolvedIdentifier(for: type)) | ||
| // } |
| // var datumOrigin: TOrigin? { | ||
| // return datumOrigin(for: resolvedIdentifier) | ||
| // } | ||
| // | ||
| // func datumOrigin<T: TypedDatum>(for type: T.Type) -> TOrigin? { | ||
| // return datumOrigin(for: resolvedIdentifier(for: type)) | ||
| // } |
| // https://tidepool.atlassian.net/browse/BACK-815 for backend to support new API to capture full history of data changes. | ||
| // This work will be covered in https://tidepool.atlassian.net/browse/LOOP-3943. For now just call createData with the | ||
| // updated data as it will just overwrite the previous data with the updated data. | ||
| tapi.createData(data, dataSetId: dataSetId) { error in |
There was a problem hiding this comment.
Is the above comment still relevant after these changes?
There was a problem hiding this comment.
I believe this is still outstanding, but isn't a blocker, as the creation makes sure the latest data is uploaded, but we lose some history.
| import TidepoolKit | ||
| import TidepoolServiceKit | ||
|
|
||
| @MainActor |
There was a problem hiding this comment.
I think View will automatically be on the MainActor if it contains an ObservableObject
| import TidepoolKit | ||
| import TidepoolServiceKit | ||
|
|
||
| @MainActor |
There was a problem hiding this comment.
I think View will automatically be on the MainActor if it contains an ObservableObject. Was there a specific need for this annotation?
There was a problem hiding this comment.
Yes, you're correct. I removed this and purposefully made the login function (called from loginButtonTapped) return from a non-main thread, and it switched back over to main actor.
| do { | ||
| environments = try await TEnvironment.fetchEnvironments() | ||
| } catch { | ||
|
|
There was a problem hiding this comment.
Do we need to write to the error property here?
| self.error = error |
There was a problem hiding this comment.
No, the environments is a "secret" list, that shouldn't expose errors to the user on failure. But good question.
| do { | ||
| try await login?(selectedEnvironment) | ||
| isLoggingIn = false | ||
| //dismiss?() |
| try await service.tapi.login(environment: environment, presenting: navController) | ||
| try await service.completeCreate() | ||
| await navController.notifyServiceCreatedAndOnboarded(service) | ||
| //await navController.notifyComplete() |
https://tidepool.atlassian.net/browse/LOOP-887
Updates for OAuth2 based authorization. Also brings in some translations from DIY (not used yet in Tidepool Loop), and a stubbed out RemoteCommand method required for Service protocol updates, also not used in Tidepool Loop.