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

View File

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