redesign notify system - #85
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 101b7138c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| mainWindow.webContents.on('did-start-navigation', (details) => { | ||
| if (details.isMainFrame && !details.isSameDocument) { | ||
| mainWindow.resetMessengerNotification(); | ||
| observedUnreadCount = null; | ||
| monitoringReadyAt = Date.now() + 5000; |
There was a problem hiding this comment.
Reset unread baselines on navigation
did-start-navigation supplies positional arguments (event, url, isInPlace, isMainFrame, ...), so details is the event object and has neither isMainFrame nor isSameDocument; this reset branch therefore never runs. After a full navigation or redirect, the initial unread badge on the newly loaded Messenger page is compared with the previous page's count instead of being baselined during the intended five-second grace period, which can produce a background notification for already-existing unread messages.
Useful? React with 👍 / 👎.
Uh oh!
There was an error while loading. Please reload this page.