[Home] Merge new Canary changes into standard, fix home duplication

pull/62/head
CanadaHonk 3 years ago
parent 9ffbdd5d7b
commit bf9ae8fe2c

@ -163,21 +163,11 @@ export default async (goosemodScope) => {
const snippetsEnabled = goosemodScope.settings.gmSettings.snippets;
goosemodScope.settingsUninjects.push(goosemodScope.patcher.patch(ConnectedPrivateChannelsList, 'default', (_args, res) => {
const newChanges = res.props.children.length === undefined;
if (newChanges) {
if (res.props.children.props.children.slice(3).find((x) => x?.toString()?.includes('GooseMod'))) return;
} else {
if (res.props.children.find((x) => x?.goosemod)) return;
}
if (res.props.children.props.children.some((x) => x.goosemod === true)) return;
const itemWrapper = (el) => {
if (newChanges) return el;
const func = () => el;
func.goosemod = true;
return func;
el.goosemod = true;
return el;
};
setTimeout(() => {
@ -196,7 +186,7 @@ export default async (goosemodScope) => {
});
}, 10);
(newChanges ? res.props.children.props.children : res.props.children).push(
res.props.children.props.children.push(
itemWrapper(React.createElement(ListSectionItem, {
className: HeaderClasses.privateChannelsHeaderContainer
},

Loading…
Cancel
Save