make sure responsive handlers are initialized before gateway settlement
This commit is contained in:
parent
3bde9249c7
commit
cb0a7330b6
2 changed files with 10 additions and 23 deletions
|
@ -28,26 +28,14 @@
|
|||
{/if}
|
||||
</svelte:head>
|
||||
|
||||
<style>
|
||||
.flex-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
<OverlayProvider />
|
||||
|
||||
<div class="flex-container">
|
||||
{#if !($smallViewport && $showPresenceSidebar) && $showSidebar || $selectedChannel.id === -1}
|
||||
<Sidebar />
|
||||
{/if}
|
||||
{#if !($smallViewport && $showSidebar) && !($smallViewport && $showPresenceSidebar) && $showChannelView && $selectedChannel.id !== -1}
|
||||
<ChannelView channel={$selectedChannel} />
|
||||
{/if}
|
||||
{#if $showPresenceSidebar}
|
||||
<PresenceSidebar />
|
||||
{/if}
|
||||
</div>
|
||||
{#if !($smallViewport && $showPresenceSidebar) && $showSidebar || $selectedChannel.id === -1}
|
||||
<Sidebar />
|
||||
{/if}
|
||||
{#if !($smallViewport && $showSidebar) && !($smallViewport && $showPresenceSidebar) && $showChannelView && $selectedChannel.id !== -1}
|
||||
<ChannelView channel={$selectedChannel} />
|
||||
{/if}
|
||||
{#if $showPresenceSidebar}
|
||||
<PresenceSidebar />
|
||||
{/if}
|
||||
|
|
|
@ -8,8 +8,6 @@ import gateway, { GatewayEventType } from './gateway';
|
|||
import "@material-design-icons/font";
|
||||
|
||||
function handleGatewaySettlement() {
|
||||
initResponsiveHandlers();
|
||||
|
||||
const loadingElement = document.getElementById("pre--loading-screen");
|
||||
if (loadingElement) {
|
||||
loadingElement.parentElement.removeChild(loadingElement);
|
||||
|
@ -27,6 +25,7 @@ function handleGatewaySettlement() {
|
|||
function main() {
|
||||
useDebuggingApi();
|
||||
useAuthHandlers();
|
||||
initResponsiveHandlers();
|
||||
|
||||
gateway.subscribe(GatewayEventType.Ready, handleGatewaySettlement);
|
||||
gateway.subscribe(GatewayEventType.Close, handleGatewaySettlement);
|
||||
|
|
Loading…
Reference in a new issue