-
Notifications
You must be signed in to change notification settings - Fork 667
DYN-5189 update notifications number #13232
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
DYN-5189 update notifications number #13232
Conversation
| using (StreamReader reader = new StreamReader(stream)) | ||
| { | ||
| jsonStringFile = reader.ReadToEnd(); | ||
| notificationsModel = JsonConvert.DeserializeObject<NotificationsModel>(jsonStringFile); |
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.
Setting the notifications to a defined model
| jsonStringFile = reader.ReadToEnd(); | ||
| notificationsModel = JsonConvert.DeserializeObject<NotificationsModel>(jsonStringFile); | ||
|
|
||
| var notificationsNumber = notificationsModel.Notifications.Count(); |
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 is counting all the notifications, but we may add a comparison between the read notification and the new ones.
|
|
||
| private void WebView_NavigationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2NavigationCompletedEventArgs e) | ||
| { | ||
| AddNotifications(notificationsModel.Notifications); |
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.
We make sure navigation is completed before calling the js function
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.
Is this because otherwise the js function may not exist?
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.
Yes, the navigation completed subscription makes sure the page content is loaded.
QilongTang
left a comment
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.
These looks fine to me, what do you think @zeusongit @reddyashish ?
|
@filipeotero Would you cherry-pick this PR to RC branch? |
* DYN-5189 update notifications number (#13232) * fetching the notifications and counting the number * setting shortcut viewmodel to internal * setting shortcut viewmodel to internal
Purpose
This PR is to count the number of notifications by requesting the backend at the dynamo side, counting and sending it to the webApp.
The implementation depends on this PR: DynamoDS/NotificationCenter#24
Declarations
Check these if you believe they are true
*.resxfilesReviewers
@QilongTang @zeusongit @reddyashish
FYIs
@jesusalvino @RobertGlobant20