From 641db09c7f2cf443c4dee288683e640f59d9e4b2 Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Thu, 3 Feb 2022 02:44:40 +0200 Subject: [PATCH] switch `layer` naming to `view` to make it less confusing --- frontend/src/components/App.svelte | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/App.svelte b/frontend/src/components/App.svelte index d058fea..fc0f513 100644 --- a/frontend/src/components/App.svelte +++ b/frontend/src/components/App.svelte @@ -8,7 +8,7 @@ import FuzzyView from "./FuzzyView.svelte"; let selectedChannel = null; let guilds = []; let user = null; - let layer = { type: "CHAT" }; + let view = { type: "CHAT" }; apiClient.getRequest("/users/@self") .then((res) => { @@ -54,12 +54,12 @@ import FuzzyView from "./FuzzyView.svelte"; if (content.startsWith(":") && content.length > 1) { switch (content[1]) { case "g": { - layer = { type: "GUILD_FUZZY" }; + view = { type: "GUILD_FUZZY" }; break; } case "c": { if (selectedGuild) { - layer = { type: "CHANNEL_FUZZY" }; + view = { type: "CHANNEL_FUZZY" }; } break; } @@ -107,7 +107,7 @@ import FuzzyView from "./FuzzyView.svelte"; function fuzzySelectedGuild({ detail: id }) { selectedGuild = guilds.find(e => e.id === id); selectedChannel = null; - layer = { type: "CHAT" }; + view = { type: "CHAT" }; } function fuzzySelectedChannel({ detail: id }) { @@ -115,7 +115,7 @@ import FuzzyView from "./FuzzyView.svelte"; return; selectedChannel = selectedGuild.channels.find(e => e.id === id); - layer = { type: "CHAT" }; + view = { type: "CHAT" }; } @@ -134,16 +134,16 @@ import FuzzyView from "./FuzzyView.svelte";
- {#if layer.type === "CHAT"} + {#if view.type === "CHAT"} - {:else if layer.type === "GUILD_FUZZY"} + {:else if view.type === "GUILD_FUZZY"} - {:else if layer.type === "CHANNEL_FUZZY"} + {:else if view.type === "CHANNEL_FUZZY"} {/if}