Skip to content

Commit

Permalink
various
Browse files Browse the repository at this point in the history
  • Loading branch information
SnosMe committed Apr 7, 2023
1 parent 0db7143 commit 2fcbfa1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
17 changes: 9 additions & 8 deletions main/build/script.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const visionBuild = await esbuild.build({
outfile: 'dist/vision.js'
})

const mainBuild = await esbuild.context({
const mainContext = await esbuild.context({
entryPoints: ['src/main.ts'],
bundle: true,
minify: !isDev,
Expand All @@ -36,18 +36,19 @@ const mainBuild = await esbuild.context({
'process.env.STATIC': (isDev) ? '"../build/icons"' : '"."',
'process.env.VITE_DEV_SERVER_URL': (isDev) ? '"http://localhost:5173"' : 'null'
},
plugins: [{
plugins: (isDev) ? [{
name: 'electron-runner',
setup (build) {
build.onEnd((result) => {
if (!result.errors.length) electronRunner.restart()
})
}
}]
}] : []
})

Promise.all([
visionBuild,
(isDev) ? mainBuild.watch() : mainBuild
])
.catch(() => process.exit(1))
if (isDev) {
await mainContext.watch()
} else {
await mainContext.rebuild()
mainContext.dispose()
}
2 changes: 1 addition & 1 deletion main/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "awakened-poe-trade",
"version": "3.20.10007",
"version": "3.20.10008",
"private": true,
"scripts": {
"dev": "node build/script.mjs",
Expand Down
2 changes: 1 addition & 1 deletion main/src/shortcuts/HostClipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class HostClipboard {
}
}
}
poll()
setTimeout(poll, POLL_DELAY)
})

return this.pollPromise
Expand Down
2 changes: 1 addition & 1 deletion renderer/src/web/background/Leagues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const useLeagues = createGlobalState(() => {

const leagueIsAlive = tradeLeagues.value.some(league => league.id === selectedId.value)
if (!leagueIsAlive && !isPrivateLeague(selectedId.value ?? '')) {
if (tradeLeagues.value.length > 2) {
if (tradeLeagues.value.length > 4) {
const TMP_CHALLENGE = 2
selectedId.value = tradeLeagues.value[TMP_CHALLENGE].id
} else {
Expand Down

0 comments on commit 2fcbfa1

Please sign in to comment.