Skip to content

Commit

Permalink
hotfix for the web
Browse files Browse the repository at this point in the history
  • Loading branch information
mytja committed Nov 17, 2023
1 parent 6ac13f0 commit cbb3514
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 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.0.6";
const RELEASE = "Beta 0.0.7";
bool OMOGOCI_STOCKSKIS_PREDLOGE = true;
bool SLEPI_TAROK = false;
bool AVTOPOTRDI_ZALOZITEV = false;
Expand Down
5 changes: 3 additions & 2 deletions tarok/lib/game/game_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import 'dart:math';
import 'dart:typed_data';

import 'package:dart_discord_rpc/dart_discord_rpc.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_initicon/flutter_initicon.dart';
import 'package:get/get.dart';
Expand Down Expand Up @@ -126,7 +127,7 @@ class GameController extends GetxController {
playingCount.value = playing;
bots = bbots;

if (Platform.isLinux || Platform.isWindows) {
if (!kIsWeb && (Platform.isLinux || Platform.isWindows)) {
rpc.updatePresence(
DiscordPresence(
details: 'Igra igro ${bots ? "z boti" : "z igralci"}',
Expand Down Expand Up @@ -157,7 +158,7 @@ class GameController extends GetxController {
void onClose() {
controller.value.dispose();

if (Platform.isLinux || Platform.isWindows) {
if (!kIsWeb && (Platform.isLinux || Platform.isWindows)) {
rpc.updatePresence(
DiscordPresence(
details: 'Gleda na začetni zaslon',
Expand Down
3 changes: 2 additions & 1 deletion tarok/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import 'dart:io';

import 'package:dart_discord_rpc/dart_discord_rpc.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_inapp_notifications/flutter_inapp_notifications.dart';
Expand Down Expand Up @@ -44,7 +45,7 @@ import 'package:url_strategy/url_strategy.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();

if (Platform.isLinux || Platform.isWindows) {
if (!kIsWeb && (Platform.isLinux || Platform.isWindows)) {
DiscordRPC.initialize();
rpc.start(autoRegister: true);
rpc.updatePresence(
Expand Down

0 comments on commit cbb3514

Please sign in to comment.