nightscout / Trio

MIT License
49 stars 154 forks source link

Override refactoring and additional functionnalities #159

Closed avouspierre closed 2 months ago

avouspierre commented 2 months ago

The PR includes a large refactoring of the swift part of override/profile functions :

  • Use of swiftInject (dependency injection) with the use of protocol class in the code
  • Use of MVP principes, in particular not use of direct coredata in view class
  • Use of a proxy model class between coredata and the app to manage changes of core data
  • Use of the pattern of observe to refresh data/view/uploads

This PR do NOT change the logic with oref and the interface of override informations in oref. This PR do NOT require a update of trio-oref code.

TODO : Changes the shortcuts after merging with PR #144 and add watch for overrides.

override display override in NS
Simulator Screenshot - iPhone 15 - 2024-05-07 at 21 43 34 CleanShot 2024-05-07 at 21 44 16
avouspierre commented 2 months ago

I created a new PR to be able to merge with the current dev version. Unable to do with the previous PR.

dnzxy commented 2 months ago

Have not thoroughly reviewed the PR, but just on a brief skim:

Please pull in latest dev so this can be checked out and tested on top of latest dev :)

Overall, great work.

avouspierre commented 2 months ago

Please pull in latest dev so this can be checked out and tested on top of latest dev :)

Thanks @dnzxy. I updated the branch with the last version of the dev, did few tests in simulator but not updated with your proposals. Will do later in the week-end.