Commit af9143ae authored by rocosen's avatar rocosen

fix:bug

parent 21a141fa
......@@ -90,6 +90,8 @@ ipcMain.on('resize-home', (event) => {
minHeight: 100,
frame: false,
resizable: false,
minimizable: false,
maximizable: false,
webPreferences: {
sandbox: false,
nodeIntegration: true,
......@@ -99,8 +101,12 @@ ipcMain.on('resize-home', (event) => {
});
homeWindown.loadURL(resolveHtmlPath(`index.html#/home`));
positioner.position(homeWindown, tray.getBounds(), alignment);
isDev && homeWindown.webContents.openDevTools();
homeWindown.on('blur', () => {
!isDev && homeWindown?.hide();
});
homeWindown.on('closed', () => {
homeWindown = null;
});
......@@ -139,7 +145,7 @@ const createWindow = async () => {
if (isDebug) {
await installExtensions();
}
if (homeWindown) return;
mainWindow = new BrowserWindow({
show: false,
width: 480,
......@@ -161,9 +167,6 @@ const createWindow = async () => {
tray = new Tray(image);
// tray.setTitle('test');
// mainWindow.setMenuBarVisibility(false);
// mainWindow.removeMenu();
// mainWindow.setMenu(null);
mainWindow.loadURL(resolveHtmlPath('index.html'));
// mainWindow.webContents.openDevTools();
......
......@@ -152,7 +152,7 @@ export default (props) => {
const scrollEvent = (e) => {
if (
e.target.clientHeight + e.target.scrollTop ===
e.target.scrollHeight
e.target.scrollHeight - 0.5
) {
setPage(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