Compare commits

..

No commits in common. "3670f23a1cbf039bb1f0cb6795f5e27c443cdce1" and "fb33f3765204d0c1d882aac0cede5b930f105bed" have entirely different histories.

2 changed files with 15 additions and 11 deletions

View File

@ -68,20 +68,26 @@ async function fixUserDataPermissions(): Promise<void> {
let quitTimeout: NodeJS.Timeout | null = null
export let mainWindow: BrowserWindow | null = null
const gotTheLock = app.requestSingleInstanceLock()
if (!gotTheLock) {
app.quit()
}
async function initApp(): Promise<void> {
await fixUserDataPermissions()
}
initApp()
.catch((e) => {
showSafeErrorBox('common.error.initFailed', `${e}`)
.then(() => {
const gotTheLock = app.requestSingleInstanceLock()
if (!gotTheLock) {
app.quit()
}
})
.catch(() => {
// ignore permission fix errors
const gotTheLock = app.requestSingleInstanceLock()
if (!gotTheLock) {
app.quit()
}
})
export function customRelaunch(): void {

View File

@ -695,9 +695,7 @@ const Mihomo: React.FC = () => {
max={65535}
min={0}
onValueChange={(v) => {
const port = parseInt(v)
setMixedPortInput(port)
patchAppConfig({ showMixedPort: port })
patchAppConfig({ showMixedPort: parseInt(v) })
setIsManualPortChange(true)
}}
/>