forked from Tarmslitaren/FrosthavenAssistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtatus
45 lines (45 loc) · 2.38 KB
/
tatus
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[1mdiff --git a/frosthaven_assistant/lib/Resource/commands/next_round_command.dart b/frosthaven_assistant/lib/Resource/commands/next_round_command.dart[m
[1mindex 5a52bd7..40deba5 100644[m
[1m--- a/frosthaven_assistant/lib/Resource/commands/next_round_command.dart[m
[1m+++ b/frosthaven_assistant/lib/Resource/commands/next_round_command.dart[m
[36m@@ -23,7 +23,6 @@[m [mclass NextRoundCommand extends Command {[m
GameMethods.shuffleDecksIfNeeded();[m
GameMethods.updateElements();[m
GameMethods.setRoundState(RoundState.chooseInitiative);[m
[31m- GameMethods.sortCharactersFirst();[m
if(_gameState.currentList.last.turnState != TurnsState.done) {[m
GameMethods.setTurnDone(_gameState.currentList.length - 1);[m
}[m
[36m@@ -31,6 +30,7 @@[m [mclass NextRoundCommand extends Command {[m
GameMethods.setTurnDone(_gameState.currentList.length - 1);[m
}[m
GameMethods.clearTurnState(false);[m
[32m+[m[32m GameMethods.sortCharactersFirst();[m
[m
_gameState.toastMessage.value = "";[m
for(var rule in _gameState.scenarioSpecialRules) {[m
[1mdiff --git a/frosthaven_assistant/lib/Resource/game_methods.dart b/frosthaven_assistant/lib/Resource/game_methods.dart[m
[1mindex 70a3991..a95541c 100644[m
[1m--- a/frosthaven_assistant/lib/Resource/game_methods.dart[m
[1m+++ b/frosthaven_assistant/lib/Resource/game_methods.dart[m
[36m@@ -555,7 +555,7 @@[m [mclass GameMethods {[m
}[m
}[m
[m
[31m- static void setTurnDone(int index) {[m
[32m+[m[32m static void setTurnDone(int index) {[m[41m [m
for (int i = 0; i < index; i++) {[m
if(_gameState.currentList[i].turnState != TurnsState.done) {[m
_gameState.currentList[i].turnState = TurnsState.done;[m
[1mdiff --git a/frosthaven_assistant/lib/main_state.dart b/frosthaven_assistant/lib/main_state.dart[m
[1mindex af5b7a9..c48e2a7 100644[m
[1m--- a/frosthaven_assistant/lib/main_state.dart[m
[1m+++ b/frosthaven_assistant/lib/main_state.dart[m
[36m@@ -36,6 +36,7 @@[m [mclass MainState extends State<MyHomePage>[m
switch (state) {[m
case AppLifecycleState.resumed:[m
print("app in resumed");[m
[32m+[m[32m rebuildAllChildren(context); //might be a bit performance heavy[m
//TODO: reconnect to last known if disconnected, and get latest state if still connected.[m
[m
break;[m