From 21b1313a185a0c80ece83ab30c46f63297436dc2 Mon Sep 17 00:00:00 2001 From: PizZaKatZe Date: Mon, 20 Dec 2021 12:50:43 +0100 Subject: [PATCH] Get rid of buggy open state --- front/src/Components/App.svelte | 5 +++-- front/src/Components/FollowMenu/FollowMenu.svelte | 4 ++-- front/src/Phaser/Player/Player.ts | 7 ------- front/src/Stores/FollowStore.ts | 1 - 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/front/src/Components/App.svelte b/front/src/Components/App.svelte index 36f815bd..5e4cfe00 100644 --- a/front/src/Components/App.svelte +++ b/front/src/Components/App.svelte @@ -42,7 +42,8 @@ import AudioManager from "./AudioManager/AudioManager.svelte"; import { showReportScreenStore, userReportEmpty } from "../Stores/ShowReportScreenStore"; import ReportMenu from "./ReportMenu/ReportMenu.svelte"; - import { followStateStore, followRoleStore, followStates, followRoles } from "../Stores/FollowStore"; + import { followStateStore, followStates } from "../Stores/FollowStore"; + import { peerStore } from "../Stores/PeerStore"; import FollowMenu from "./FollowMenu/FollowMenu.svelte"; export let game: Game; @@ -104,7 +105,7 @@ {/if} - {#if $followStateStore !== followStates.off || $followRoleStore === followRoles.open} + {#if $followStateStore !== followStates.off || $peerStore.size > 0}
diff --git a/front/src/Components/FollowMenu/FollowMenu.svelte b/front/src/Components/FollowMenu/FollowMenu.svelte index e26032bb..72f55613 100644 --- a/front/src/Components/FollowMenu/FollowMenu.svelte +++ b/front/src/Components/FollowMenu/FollowMenu.svelte @@ -158,7 +158,7 @@ vim: ft=typescript {/if} -{#if followRole === followRoles.open} +{#if followState === followStates.off} - {:else if followUsers.length > 0} + {:else}