Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Dependency Injection Everywhere #582

Merged
merged 15 commits into from
Jan 17, 2025
Merged

Conversation

theospears
Copy link
Collaborator

@theospears theospears commented Dec 30, 2024

Summary

Remove almost all references to ServiceLocator. Instead use a dependency injection pattern to pass required objects in via constructor parameters.

Validation

Launch the app in simulator. Verify I can navigate to the impacted views:

  • Edit Datapoint
  • Gallery
  • Goal
  • Assign HK metric to goal
  • Configure notifications
  • Edit default notifications
  • Remove HK metric
  • Settings
  • Timer

@theospears theospears changed the title Dependency injection Use Dependency Injection Everywhere Dec 30, 2024
Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@theospears theospears force-pushed the dependency-injection-everywhere branch from 03a27bd to 777eeda Compare December 30, 2024 04:13
@theospears theospears force-pushed the dependency-injection-everywhere branch from 87f62d7 to 91266ed Compare January 16, 2025 23:04
@theospears theospears marked this pull request as ready for review January 16, 2025 23:23
@theospears theospears requested a review from a team as a code owner January 16, 2025 23:23
@theospears theospears merged commit 205c8d4 into master Jan 17, 2025
6 checks passed
@theospears theospears deleted the dependency-injection-everywhere branch January 17, 2025 03:07
@@ -3,14 +3,16 @@
// BeeSwift
//
// Created by Andy Brett on 3/14/17.
// Copyright 2017 APB. All rights reserved.
// Copyright © 2017 APB. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀
Some MRs ago these were all removed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh. I wonder how this merge conflict snuck in

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swiftformat can be configured to adjust file headers and it could be run as part of a general format-code or ci-check/build step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants