Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33317206
D5868.1768831349.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D5868.1768831349.diff
View Options
diff --git a/desktop/src/main.js b/desktop/src/main.js
--- a/desktop/src/main.js
+++ b/desktop/src/main.js
@@ -98,12 +98,14 @@
});
};
win.webContents.on('did-navigate-in-page', updateNavigationState);
- ipcMain.on('clear-history', () => {
+
+ const clearHistory = () => {
win.webContents.clearHistory();
updateNavigationState();
- });
+ };
+ ipcMain.on('clear-history', clearHistory);
- ipcMain.on('double-click-top-bar', () => {
+ const doubleClickTopBar = () => {
if (isMac) {
// Possible values for AppleActionOnDoubleClick are Maximize,
// Minimize or None. We handle the last two inside this if.
@@ -126,10 +128,12 @@
} else {
win.maximize();
}
- });
+ };
+ ipcMain.on('double-click-top-bar', doubleClickTopBar);
- ipcMain.on('set-badge', (event, value) => {
- app.dock.setBadge(value?.toString() ?? '');
+ win.on('closed', () => {
+ ipcMain.removeListener('clear-history', clearHistory);
+ ipcMain.removeListener('double-click-top-bar', doubleClickTopBar);
});
win.webContents.setWindowOpenHandler(({ url: openURL }) => {
@@ -222,6 +226,11 @@
(async () => {
await app.whenReady();
+
+ ipcMain.on('set-badge', (event, value) => {
+ app.dock.setBadge(value?.toString() ?? '');
+ });
+
show();
app.on('activate', () => {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 2:02 PM (16 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5956756
Default Alt Text
D5868.1768831349.diff (1 KB)
Attached To
Mode
D5868: [desktop] Fix error when trying to maximize after closing the window
Attached
Detach File
Event Timeline
Log In to Comment