mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-12 23:08:13 -05:00
🐛 Fix(custom): fix rename window bug
ISSUES CLOSED: #186,#117
This commit is contained in:
parent
715f662630
commit
45fae3072d
@ -106,10 +106,14 @@ class Uploader {
|
|||||||
const window = windowManager.create(IWindowList.RENAME_WINDOW)!
|
const window = windowManager.create(IWindowList.RENAME_WINDOW)!
|
||||||
logger.info('create rename window')
|
logger.info('create rename window')
|
||||||
ipcMain.on(GET_RENAME_FILE_NAME, (evt) => {
|
ipcMain.on(GET_RENAME_FILE_NAME, (evt) => {
|
||||||
|
try {
|
||||||
if (evt.sender.id === window.webContents.id) {
|
if (evt.sender.id === window.webContents.id) {
|
||||||
logger.info('rename window ready, wait for rename...')
|
logger.info('rename window ready, wait for rename...')
|
||||||
window.webContents.send(RENAME_FILE_NAME, fileName, item.fileName, window.webContents.id)
|
window.webContents.send(RENAME_FILE_NAME, fileName, item.fileName, window.webContents.id)
|
||||||
}
|
}
|
||||||
|
} catch (e: any) {
|
||||||
|
logger.error(e)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
name = await waitForRename(window, window.webContents.id)
|
name = await waitForRename(window, window.webContents.id)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user