Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iOS): Fix chatbar when use sidebar #963

Merged
merged 4 commits into from
Dec 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/routes/chat/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@
let contentAsideOpen = false
let showBrowseFilesModal = false
$: clipboardWrite = writable(Permission.UNDEFINED)
let sidebarOpen = get(UIStore.state.sidebarOpen)

UIStore.state.sidebarOpen.subscribe(open => {
sidebarOpen = open
})

$: sidebarOpen = UIStore.state.sidebarOpen
$: activeChat = Store.state.activeChat
$: isFavorite = derived(Store.state.favorites, favs => favs.some(f => f.id === $activeChat.id))
$: conversation = ConversationStore.getConversation($activeChat)
Expand Down Expand Up @@ -581,7 +585,7 @@
{/if}

<!-- Sidebar -->
<Sidebar loading={loading} on:toggle={toggleSidebar} open={$sidebarOpen} activeRoute={Route.Chat} bind:search={search_filter} on:search={() => search_component.filter_chat()} on:enter={() => search_component.select_first()}>
<Sidebar loading={loading} on:toggle={toggleSidebar} open={sidebarOpen} activeRoute={Route.Chat} bind:search={search_filter} on:search={() => search_component.filter_chat()} on:enter={() => search_component.select_first()}>
<ChatFilter bind:this={search_component} bind:filter={search_filter}></ChatFilter>
<!--
<Button hook="button-marketplace" appearance={showMarket ? Appearance.Primary : Appearance.Alt} text={$_("market.market")} on:click={_ => (showMarket = true)}>
Expand Down Expand Up @@ -957,7 +961,7 @@
})
}} />

{#if $activeChat.users.length > 0 && (!isAndroidOriOS() || (isAndroidOriOS() && get(UIStore.state.sidebarOpen) === false))}
{#if $activeChat.users.length > 0 && (!isAndroidOriOS() || (isAndroidOriOS() && !sidebarOpen))}
<Chatbar
replyTo={replyTo}
activeChat={$activeChat}
Expand Down
Loading