Commit af9143ae authored by rocosen's avatar rocosen

fix:bug

parent 21a141fa
...@@ -90,6 +90,8 @@ ipcMain.on('resize-home', (event) => { ...@@ -90,6 +90,8 @@ ipcMain.on('resize-home', (event) => {
minHeight: 100, minHeight: 100,
frame: false, frame: false,
resizable: false, resizable: false,
minimizable: false,
maximizable: false,
webPreferences: { webPreferences: {
sandbox: false, sandbox: false,
nodeIntegration: true, nodeIntegration: true,
...@@ -99,8 +101,12 @@ ipcMain.on('resize-home', (event) => { ...@@ -99,8 +101,12 @@ ipcMain.on('resize-home', (event) => {
}); });
homeWindown.loadURL(resolveHtmlPath(`index.html#/home`)); homeWindown.loadURL(resolveHtmlPath(`index.html#/home`));
positioner.position(homeWindown, tray.getBounds(), alignment); positioner.position(homeWindown, tray.getBounds(), alignment);
isDev && homeWindown.webContents.openDevTools(); isDev && homeWindown.webContents.openDevTools();
homeWindown.on('blur', () => {
!isDev && homeWindown?.hide();
});
homeWindown.on('closed', () => { homeWindown.on('closed', () => {
homeWindown = null; homeWindown = null;
}); });
...@@ -139,7 +145,7 @@ const createWindow = async () => { ...@@ -139,7 +145,7 @@ const createWindow = async () => {
if (isDebug) { if (isDebug) {
await installExtensions(); await installExtensions();
} }
if (homeWindown) return;
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
show: false, show: false,
width: 480, width: 480,
...@@ -161,9 +167,6 @@ const createWindow = async () => { ...@@ -161,9 +167,6 @@ const createWindow = async () => {
tray = new Tray(image); tray = new Tray(image);
// tray.setTitle('test'); // tray.setTitle('test');
// mainWindow.setMenuBarVisibility(false);
// mainWindow.removeMenu();
// mainWindow.setMenu(null);
mainWindow.loadURL(resolveHtmlPath('index.html')); mainWindow.loadURL(resolveHtmlPath('index.html'));
// mainWindow.webContents.openDevTools(); // mainWindow.webContents.openDevTools();
......
...@@ -152,7 +152,7 @@ export default (props) => { ...@@ -152,7 +152,7 @@ export default (props) => {
const scrollEvent = (e) => { const scrollEvent = (e) => {
if ( if (
e.target.clientHeight + e.target.scrollTop === e.target.clientHeight + e.target.scrollTop ===
e.target.scrollHeight e.target.scrollHeight - 0.5
) { ) {
setPage(page + 1); setPage(page + 1);
getMessage(page + 1); getMessage(page + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment