mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 21:12:45 +08:00
FIX: toggle chat drawer on channel thread list (#28759)
Chat toggle relies on using a height: auto to collapse drawer, however in channel threads we should be only displaying threads when drawer is expanded. Displaying threads conditionally based on drawer toggle status fixes this.
This commit is contained in:
parent
6bb8ac54cb
commit
b7cfd4e146
|
@ -12,6 +12,7 @@ import ChatThreadList from "discourse/plugins/chat/discourse/components/chat-thr
|
||||||
export default class ChatDrawerRoutesChannelThreads extends Component {
|
export default class ChatDrawerRoutesChannelThreads extends Component {
|
||||||
@service chat;
|
@service chat;
|
||||||
@service chatChannelsManager;
|
@service chatChannelsManager;
|
||||||
|
@service chatStateManager;
|
||||||
|
|
||||||
backLinkTitle = I18n.t("chat.return_to_list");
|
backLinkTitle = I18n.t("chat.return_to_list");
|
||||||
|
|
||||||
|
@ -57,14 +58,16 @@ export default class ChatDrawerRoutesChannelThreads extends Component {
|
||||||
</Navbar>
|
</Navbar>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="chat-drawer-content" {{didInsert this.fetchChannel}}>
|
{{#if this.chatStateManager.isDrawerExpanded}}
|
||||||
{{#if this.chat.activeChannel}}
|
<div class="chat-drawer-content" {{didInsert this.fetchChannel}}>
|
||||||
<ChatThreadList
|
{{#if this.chat.activeChannel}}
|
||||||
@channel={{this.chat.activeChannel}}
|
<ChatThreadList
|
||||||
@includeHeader={{false}}
|
@channel={{this.chat.activeChannel}}
|
||||||
/>
|
@includeHeader={{false}}
|
||||||
{{/if}}
|
/>
|
||||||
</div>
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user