aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/index.ts
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-12-16 22:19:45 -0800
committerPinapelz <yukais@pinapelz.com>2025-12-16 22:19:45 -0800
commitb5bf0b2ccad217eb4a6ae61bc0371dd5a1e87afb (patch)
treeb2efead7771334ace24006aa676870b0344502e0 /src/main/index.ts
parent19c36877e7186c244d9c284e70e85a059f361de3 (diff)
add true message caching
- caches only valid message. setting also reflects this
Diffstat (limited to 'src/main/index.ts')
-rw-r--r--src/main/index.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/index.ts b/src/main/index.ts
index 344465f..0aa3e63 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -2,16 +2,18 @@ import { app, BrowserWindow, shell, ipcMain } from 'electron'
import { join } from 'path'
import { electronApp, optimizer, is, platform } from '@electron-toolkit/utils'
import { WebSocketServer, WebSocket } from 'ws'
+
import icon from '../../resources/icon.png?asset'
let mainWindow: BrowserWindow
-let store: import('electron-store').default<{ channelNicknames: Record<string, string> }>
+let store: any
async function initStore(): Promise<void> {
const Store = (await import('electron-store')).default
store = new Store({
defaults: {
- channelNicknames: {}
+ channelNicknames: {},
+ maxMessages: 300
}
})
}
@@ -104,7 +106,7 @@ function setupIpcHandlers(): void {
// Get max messages
ipcMain.handle('config:get-max-messages', () => {
- return store.get('maxMessages', 300) // Default to 100 if not set
+ return store.get('maxMessages', 300) // Default to 300 if not set
})
// Set max messages
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage