diff --git a/src/core/plugins/kettuenhancements/index.tsx b/src/core/plugins/kettuenhancements/index.tsx deleted file mode 100644 index b3cd75a..0000000 --- a/src/core/plugins/kettuenhancements/index.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { defineCorePlugin } from ".."; - -export default defineCorePlugin({ - manifest: { - id: "bunny.enhancements", - version: "0.1.0", - type: "plugin", - spec: 3, - main: "", - display: { - name: "Kettu Enhancements", - description: "Fixes common discord bugs because discord wont", - authors: [{ name: "cocobo1"}] - } - }, - start() { - } -}); \ No newline at end of file diff --git a/src/core/ui/settings/pages/Developer/AssetBrowser.tsx b/src/core/ui/settings/pages/Developer/AssetBrowser.tsx index 785cb78..63f5ed6 100644 --- a/src/core/ui/settings/pages/Developer/AssetBrowser.tsx +++ b/src/core/ui/settings/pages/Developer/AssetBrowser.tsx @@ -1,71 +1,51 @@ import AssetDisplay from "@core/ui/settings/pages/Developer/AssetDisplay"; -import { iterateAssets, findAssetId } from "@lib/api/assets"; +import { iterateAssets } from "@lib/api/assets"; import { Text } from "@metro/common/components"; import { ErrorBoundary, Search } from "@ui/components"; import { useMemo } from "react"; -import { FlatList, View, ScrollView, TouchableOpacity, Image } from "react-native"; - -const displayable = new Set(['png', 'jpg', 'svg']); +import { FlatList, View } from "react-native"; export default function AssetBrowser() { - const [search, setSearch] = React.useState(""); - const [showNonImages, setShowNonImages] = React.useState(false); + const [search, setSearch] = React.useState(""); + const all = useMemo(() => Array.from(iterateAssets()), []); - const all = useMemo(() => Array.from(iterateAssets()), []); - - const filteredData = useMemo(() => { - let result = all.filter(a => a.name.includes(search) || a.id.toString() === search); - - if (!showNonImages) { - result = result.filter(a => displayable.has(a.type)); - } - - return result; - }, [all, search, showNonImages]); - - - return ( - - - - - setSearch(v)} - /> - - setShowNonImages(!showNonImages)} - > - - - - - - {showNonImages && ( - Some assets types cannot be displayed and will be marked in red. - )} - } - contentContainerStyle={{ overflow: 'hidden', backgroundColor: 'transparent', borderRadius: 16 }} - scrollEnabled={false} - keyExtractor={a => a.id.toString()} - /> - - - - - ); + return ( + + + setSearch(v)} + /> + + + Some assets types cannot be displayed and will be marked in red. + + a.name.includes(search) || a.id.toString() === search, + )} + renderItem={({ item }: any) => } + contentContainerStyle={{ + overflow: "hidden", + backgroundColor: "transparent", + borderRadius: 16, + }} + keyExtractor={(a) => a.name} + /> + + + + ); }