mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-23 23:15:10 +00:00
Merge branch 'dev' into feat/api/SettingsLists
This commit is contained in:
commit
b12511567e
2 changed files with 7 additions and 4 deletions
|
@ -57,7 +57,7 @@ export const Heading = waitForComponent<t.Heading>("Heading", filters.componentB
|
|||
export const Select = waitForComponent<t.Select>("Select", filters.componentByCode('.selectPositionTop]:"top"===', '"Escape"==='));
|
||||
export const SearchableSelect = waitForComponent<t.SearchableSelect>("SearchableSelect", filters.componentByCode('.selectPositionTop]:"top"===', ".multi]:"));
|
||||
export const Slider = waitForComponent<t.Slider>("Slider", filters.componentByCode('"markDash".concat('));
|
||||
export const Popout = waitForComponent<t.Popout>("Popout", filters.componentByCode("ref:this.ref,preload:"));
|
||||
export const Popout = waitForComponent<t.Popout>("Popout", filters.componentByCode("ref:this.ref,", "renderPopout:this.renderPopout,"));
|
||||
export const Dialog = waitForComponent<t.Dialog>("Dialog", filters.componentByCode('role:"dialog",tabIndex:-1'));
|
||||
export const TabBar = waitForComponent("TabBar", filters.componentByCode("ref:this.tabBarRef,className:"));
|
||||
export const Paginator = waitForComponent<t.Paginator>("Paginator", filters.componentByCode('rel:"prev",children:'));
|
||||
|
|
|
@ -69,12 +69,12 @@ export const filters = {
|
|||
m.constructor?.displayName === name,
|
||||
|
||||
componentByCode: (...code: CodeFilter): FilterFn => {
|
||||
const filter = filters.byCode(...code);
|
||||
return m => {
|
||||
const byCodeFilter = filters.byCode(...code);
|
||||
const filter = m => {
|
||||
let inner = m;
|
||||
|
||||
while (inner != null) {
|
||||
if (filter(inner)) return true;
|
||||
if (byCodeFilter(inner)) return true;
|
||||
else if (!inner.$$typeof) return false;
|
||||
else if (inner.type) inner = inner.type; // memos
|
||||
else if (inner.render) inner = inner.render; // forwardRefs
|
||||
|
@ -83,6 +83,9 @@ export const filters = {
|
|||
|
||||
return false;
|
||||
};
|
||||
|
||||
filter.$$vencordProps = [...code];
|
||||
return filter;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue