Skip to content

Commit

Permalink
Fix offline game from editor
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Feb 27, 2020
1 parent c66964b commit eb33d7f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion android/app/src/main/assets/capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"npmClient": "npm",
"webDir": "www",
"backgroundColor": "ff000000",
"appendUserAgent": "Lichobile/7.0.3",
"appendUserAgent": "Lichobile/7.0.4",
"plugins": {
"PushNotifications": {
"presentationOptions": ["sound", "alert"]
Expand Down
2 changes: 1 addition & 1 deletion ios/App/App/capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"npmClient": "npm",
"webDir": "www",
"backgroundColor": "ff000000",
"appendUserAgent": "Lichobile/7.0.3",
"appendUserAgent": "Lichobile/7.0.4",
"plugins": {
"PushNotifications": {
"presentationOptions": ["sound", "alert"]
Expand Down
2 changes: 2 additions & 0 deletions src/ui/ai/AiRound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export default class AiRound implements AiRoundInterface, PromotingInterface {
if (setupVariant) {
settings.ai.variant(setupVariant)
}

redraw()
}

this.engine.init()
Expand Down
7 changes: 3 additions & 4 deletions src/ui/otb/OtbRound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ export default class OtbRound implements OtbRoundInterface, PromotingInterface {
if (setupVariant) {
settings.otb.variant(setupVariant)
}

redraw()
}
else {
if (!saved || saved.ply === 0)
this.newGameMenu.open()
}
else if (!saved || saved.ply === 0) this.newGameMenu.open()

const currentVariant = <VariantKey>settings.otb.variant()
if (!setupFen) {
Expand Down

0 comments on commit eb33d7f

Please sign in to comment.