Skip to content

Commit

Permalink
hotfix for mobile devices + bump to v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mytja committed Jan 1, 2024
1 parent 2a47805 commit 076eafc
Show file tree
Hide file tree
Showing 14 changed files with 714 additions and 655 deletions.
2 changes: 1 addition & 1 deletion tarok/lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const WS_URL =
kReleaseMode ? "wss://palcka.si/api/ws" : "ws://localhost:8080/ws";
const LOBBY_WS_URL =
kReleaseMode ? "wss://palcka.si/api/lobby" : "ws://localhost:8080/lobby";
const RELEASE = "0.1.0";
const RELEASE = "0.1.1";
bool OMOGOCI_STOCKSKIS_PREDLOGE = true;
bool SLEPI_TAROK = false;
bool AVTOPOTRDI_ZALOZITEV = false;
Expand Down
5 changes: 5 additions & 0 deletions tarok/lib/game/game_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ class GameController extends GetxController {

@override
void onClose() {
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);

controller.value.dispose();

if (!kIsWeb && (Platform.isLinux || Platform.isWindows)) {
Expand Down
12 changes: 6 additions & 6 deletions tarok/lib/lobby/friends.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Friends extends StatelessWidget {
child: Row(
children: [
const SizedBox(
width: 100,
width: 10,
),
Initicon(
text: e.name,
Expand Down Expand Up @@ -95,7 +95,7 @@ class Friends extends StatelessWidget {
},
),
const SizedBox(
width: 100,
width: 10,
),
],
),
Expand All @@ -113,7 +113,7 @@ class Friends extends StatelessWidget {
child: Row(
children: [
const SizedBox(
width: 100,
width: 10,
),
Initicon(
text: e.name,
Expand Down Expand Up @@ -147,7 +147,7 @@ class Friends extends StatelessWidget {
},
),
const SizedBox(
width: 100,
width: 10,
),
],
),
Expand All @@ -165,7 +165,7 @@ class Friends extends StatelessWidget {
child: Row(
children: [
const SizedBox(
width: 100,
width: 10,
),
SizedBox(
height: 70,
Expand Down Expand Up @@ -244,7 +244,7 @@ class Friends extends StatelessWidget {
if (gameId != "" && invited.contains(e.id))
const Icon(Icons.check),
const SizedBox(
width: 100,
width: 10,
),
],
),
Expand Down
636 changes: 5 additions & 631 deletions tarok/lib/lobby/lobby.dart

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions tarok/lib/lobby/lobby_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ class LobbyController extends GetxController {
),
);
tournaments.value = jsonDecode(response.data);
print(tournaments);
}

Future<void> newGame(int players) async {
Expand Down Expand Up @@ -499,10 +500,14 @@ class LobbyController extends GetxController {
// eh, nič zato, smo čist v redu
}

print("fetching tournaments");

try {
await fetchTournaments();
} catch (e) {}

print("done fetching tournaments");

super.onInit();
}

Expand Down
Loading

0 comments on commit 076eafc

Please sign in to comment.