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

chore: fix double notification routing and segment callback #473

Merged
merged 3 commits into from
Jul 8, 2024

Conversation

saeedbashir
Copy link
Contributor

This PR fixes the issue with push notifications.

Issue details: #472

@@ -29,18 +29,28 @@ class PushNotificationsManager: NSObject {
private let deepLinkManager: DeepLinkManager
private let storage: CoreStorage
private let api: API
private let segemntService: SegmentAnalyticsService?
Copy link
Contributor

Choose a reason for hiding this comment

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

typo segemntService -> segmentService

Comment on lines 43 to 48
public init(deepLinkManager: DeepLinkManager,
storage: CoreStorage,
api: API,
config: ConfigProtocol,
segmentService: SegmentAnalyticsService?
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
public init(deepLinkManager: DeepLinkManager,
storage: CoreStorage,
api: API,
config: ConfigProtocol,
segmentService: SegmentAnalyticsService?
) {
public init(
deepLinkManager: DeepLinkManager,
storage: CoreStorage,
api: API,
config: ConfigProtocol,
segmentService: SegmentAnalyticsService?
) {

Comment on lines 180 to 181
config: r.resolve(ConfigProtocol.self)!,
segmentService: r.resolve(SegmentAnalyticsService.self)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we use an Analytics abstraction and not rely on the Segment dependency here?
We are going to migrate all third-party services to plugins, and this dependency could make it harder.

Copy link
Contributor

@volodymyr-chekyrta volodymyr-chekyrta left a comment

Choose a reason for hiding this comment

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

LGTM

@volodymyr-chekyrta volodymyr-chekyrta merged commit 9901340 into openedx:develop Jul 8, 2024
3 checks passed
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.

iOS: Double notification when the app is active and segment notifications completion
3 participants