mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 13:23:28 -05:00
Fix ChannelTabs on Canary
This commit is contained in:
parent
12453e0b85
commit
6e9b22bd14
3 changed files with 1 additions and 19 deletions
|
@ -268,7 +268,7 @@ export default function BookmarkContainer(props: BasicChannelTabsProps & { userI
|
||||||
{bookmarks && !bookmarks.length && <Text className={cl("bookmark-placeholder-text")} variant="text-xs/normal">
|
{bookmarks && !bookmarks.length && <Text className={cl("bookmark-placeholder-text")} variant="text-xs/normal">
|
||||||
You have no bookmarks. You can add an open tab or hide this by right clicking it
|
You have no bookmarks. You can add an open tab or hide this by right clicking it
|
||||||
</Text>}
|
</Text>}
|
||||||
{bookmarks?.length &&
|
{Array.isArray(bookmarks) && bookmarks.length > 0 &&
|
||||||
bookmarks.map((_, i) => (
|
bookmarks.map((_, i) => (
|
||||||
<Bookmark key={i} index={i} bookmarks={bookmarks} methods={methods} />
|
<Bookmark key={i} index={i} bookmarks={bookmarks} methods={methods} />
|
||||||
))
|
))
|
||||||
|
|
|
@ -30,16 +30,6 @@ export default function ChannelsTabsContainer(props: BasicChannelTabsProps) {
|
||||||
if (save) saveTabs(userId);
|
if (save) saveTabs(userId);
|
||||||
}, [userId]);
|
}, [userId]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
// for some reason, the app directory is it's own page instead of a layer, so when it's opened
|
|
||||||
// everything behind it is destroyed, including our container. this workaround is required
|
|
||||||
// to properly add the container back without reinitializing everything
|
|
||||||
if ((Vencord.Plugins.plugins.ChannelTabs as any).appDirectoryClosed) {
|
|
||||||
setUserId(UserStore.getCurrentUser().id);
|
|
||||||
update(false);
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const ref = useRef<HTMLDivElement>(null);
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
@ -82,14 +82,6 @@ export default definePlugin({
|
||||||
match: /\i&&\((\i).maxHeight.{0,5}\)/,
|
match: /\i&&\((\i).maxHeight.{0,5}\)/,
|
||||||
replace: "$&;$1.maxHeight-=$self.containerHeight"
|
replace: "$&;$1.maxHeight-=$self.containerHeight"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
// workaround for app directory killing our component, see comments in ChannelTabContainer.tsx
|
|
||||||
{
|
|
||||||
find: ".ApplicationDirectoryEntrypointNames.EXTERNAL",
|
|
||||||
replacement: {
|
|
||||||
match: /(\.guildSettingsSection\).{0,30})},\[/,
|
|
||||||
replace: "$1;$self.onAppDirectoryClose()},["
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue