SidebarChat: Fix

This commit is contained in:
thororen1234 2025-07-31 22:16:25 -04:00
parent 99c232d5f6
commit 0f93c6516b
No known key found for this signature in database

View file

@ -41,11 +41,15 @@ import {
import { settings, SidebarStore } from "./store";
const { HeaderBar, HeaderBarIcon } = mapMangledModuleLazy(".themedMobile]:", {
HeaderBarIcon: filters.componentByCode(".HEADER_BAR_BADGE_TOP:", '.iconBadge,"top"'),
// ??? no clue why this HeaderBarIcon doesnt work, its the same as the one below
const { HeaderBar, /* HeaderBarIcon*/ } = mapMangledModuleLazy(".themedMobile]:", {
HeaderBarIcon: filters.componentByCode('size:"custom",'),
HeaderBar: filters.byCode(".themedMobile]:"),
});
// from toolbox
const HeaderBarIcon = findComponentByCodeLazy(".HEADER_BAR_BADGE_TOP:", '.iconBadge,"top"');
const ArrowsLeftRightIcon = () => {
return <svg aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--interactive-normal)" d="M2.3 7.7a1 1 0 0 1 0-1.4l4-4a1 1 0 0 1 1.4 1.4L5.42 6H21a1 1 0 1 1 0 2H5.41l2.3 2.3a1 1 0 1 1-1.42 1.4l-4-4ZM17.7 21.7l4-4a1 1 0 0 0 0-1.4l-4-4a1 1 0 0 0-1.4 1.4l2.29 2.3H3a1 1 0 1 0 0 2h15.59l-2.3 2.3a1 1 0 0 0 1.42 1.4Z"></path></svg>;
};
@ -126,7 +130,7 @@ export default definePlugin({
},
renderSidebar: ErrorBoundary.wrap(() => {
const { guild, channel } = useStateFromStores([SidebarStore], () => SidebarStore.getFullState());
const { guild, channel, /* width*/ } = useStateFromStores([SidebarStore], () => SidebarStore.getFullState());
const [width, setWidth] = useState(0);
const [channelSidebar, guildSidebar] = useStateFromStores(
@ -162,7 +166,7 @@ export default definePlugin({
return (
<Resize
sidebarType={Sidebars.MessageRequestSidebar}
maxWidth={~~(width * 0.31)
maxWidth={~~(width * 0.31)/* width - 690*/
}
>
<HeaderBar