DYN-5189 update notifications number#13232
Merged
QilongTang merged 3 commits intoDynamoDS:masterfrom Aug 25, 2022
Merged
Conversation
filipeotero
commented
Aug 22, 2022
| using (StreamReader reader = new StreamReader(stream)) | ||
| { | ||
| jsonStringFile = reader.ReadToEnd(); | ||
| notificationsModel = JsonConvert.DeserializeObject<NotificationsModel>(jsonStringFile); |
Contributor
Author
There was a problem hiding this comment.
Setting the notifications to a defined model
filipeotero
commented
Aug 22, 2022
| jsonStringFile = reader.ReadToEnd(); | ||
| notificationsModel = JsonConvert.DeserializeObject<NotificationsModel>(jsonStringFile); | ||
|
|
||
| var notificationsNumber = notificationsModel.Notifications.Count(); |
Contributor
Author
There was a problem hiding this comment.
This is counting all the notifications, but we may add a comparison between the read notification and the new ones.
filipeotero
commented
Aug 22, 2022
|
|
||
| private void WebView_NavigationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2NavigationCompletedEventArgs e) | ||
| { | ||
| AddNotifications(notificationsModel.Notifications); |
Contributor
Author
There was a problem hiding this comment.
We make sure navigation is completed before calling the js function
Contributor
There was a problem hiding this comment.
Is this because otherwise the js function may not exist?
Contributor
Author
There was a problem hiding this comment.
Yes, the navigation completed subscription makes sure the page content is loaded.
QilongTang
reviewed
Aug 24, 2022
QilongTang
reviewed
Aug 24, 2022
Contributor
QilongTang
left a comment
There was a problem hiding this comment.
These looks fine to me, what do you think @zeusongit @reddyashish ?
reddyashish
approved these changes
Aug 25, 2022
zeusongit
approved these changes
Aug 25, 2022
Contributor
|
@filipeotero Would you cherry-pick this PR to RC branch? |
QilongTang
pushed a commit
that referenced
this pull request
Aug 25, 2022
* DYN-5189 update notifications number (#13232) * fetching the notifications and counting the number * setting shortcut viewmodel to internal * setting shortcut viewmodel to internal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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