-
Notifications
You must be signed in to change notification settings - Fork 385
Fix notification bug #2689
base: master
Are you sure you want to change the base?
Fix notification bug #2689
Conversation
@@ -33,6 +33,10 @@ RouterPropsSource { | |||
sessionManager.addListener(listener: self) | |||
} | |||
|
|||
func getAppClient() -> GithubClient? { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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 :(
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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 inNotificationModelController
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 theGithubClient
which isn't great.