mirror of
https://github.com/Aetherinox/ntfy-desktop.git
synced 2026-04-25 15:05:52 +03:00
[GH-ISSUE #88] 🗺️ Roadmap: Message Indicator #9
Labels
No labels
Build › MacOS
Status › Need Info
Status › No Action
Status › Released
Type › Bug
Type › Feature
Type › Feature
Type › Roadmap
pull-request
❔ Question
📰 Progress Report
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy-desktop#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Aetherinox on GitHub (Jun 10, 2025).
Original GitHub issue: https://github.com/Aetherinox/ntfy-desktop/issues/88
Originally assigned to: @Aetherinox on GitHub.
Summary
Add application badge indicator stating how many unread messages are currently pending review in the desktop app.
Tasks
preload.jsscript and attach it toBrowserWindowsendreceiveBrowserWindowshould contain the followingwebPreferences:nodeIntegration: falsecontextIsolation: trueenableRemoteModule: falsepreload: path.join(__dirname, "preload.js")window.api.receiveintowebContents.on( 'did-finish-load', ()ipcMainin main processindex.jsStorageclass to store current number of unread messagesResources
References:
Notes
Since we are injecting code between the main process and the ipc; we must ensure security when sending data. Main browser window must contain the following settings
The renderer should not have direct access to node (ie. require()). We should only be giving access to
require(), and anytime the renderer process needs to use require, marshal a request to the main process.On the renderer side; we set up ipcRenderer bindings. On the main side; set up ipcMain bindings.
In the ipcMain bindings; set up listener methods that use modules that we
require(). This allows the main process access torequire(), but moderates what it has access to.Use the contextBridge to pass the ipcRenderer bindings to our app code for use. When the app needs to use the
required()modules in main, it sends a message via IPC (inter-process-communication) and the main process runs some code, and we then send a message back with our result.@Aetherinox commented on GitHub (Jun 25, 2025):
Update
rendererandpreloadscripts to handle communication between all processes