Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Fix notification bug #2689

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Huddie
Copy link
Collaborator

@Huddie Huddie commented Mar 13, 2019

Closes #2298

@BasThomas let me know if this makes sense.

Issue:
Tapping notification to open issue doesn't mark the notification read

Solution:
Notification ID is passed apart of the request when creating local notification. Before routing to the Issue, extract the ID and mark the notification as read.

We are marking notifications are read before actually displaying the notification but this no different than how it works when tapping on a note. in the inbox.

Possible enhancement:
We have some redundant code here. The markNotificationRead method shows up here and in NotificationModelController suggestions are welcome as to where the best place to put it is. Keep in mind if we refactor both methods we will need to pass in the GithubClient which isn't great.

@Huddie Huddie added the 💤 awaiting review Pull Request is awaiting code reviews label Mar 13, 2019
@@ -33,6 +33,10 @@ RouterPropsSource {
sessionManager.addListener(listener: self)
}

func getAppClient() -> GithubClient? {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This feels a bit weird to me... think it would be nice if we can keep the reading logic in one place.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No problem so how should I get the app client in the extension?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hm, that's a question I don't know I can answer :(

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can make it public or create a getter, or I could move the extension into the main class

Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like option 3 would be the best for now.

@Huddie Huddie added 😴 awaiting changes Changes requested, waiting on author to update and removed 💤 awaiting review Pull Request is awaiting code reviews labels Mar 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
😴 awaiting changes Changes requested, waiting on author to update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants