fix: register start-only plugins during start stage

Previously they were registered on init which may have caused some minor performance issues.
This commit is contained in:
PalmDevs 2025-07-14 23:13:52 +07:00
parent 050b147147
commit 8d4581f9c1
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA
46 changed files with 6 additions and 1 deletions

View file

@ -17,6 +17,8 @@ for (const plugin of pList.values())
const unsub = onRunApplication(() => {
unsub()
require('~/plugins/start')
for (const plugin of pList.values())
if (plugin.flags & PluginFlags.Enabled) startPlugin(plugin)
})

3
src/plugins/start.ts Normal file
View file

@ -0,0 +1,3 @@
import.meta.glob(['./start/*/index.ts', './start/*/index.tsx'], {
eager: true,
})

View file

@ -24,6 +24,7 @@ const events = new TypedEventEmitter<{
errored: [unknown]
}>()
// TODO(PalmDevs): This currently returns undefined because it is ran too early
const CircleXIcon = lookupGeneratedIconComponent(
'CircleXIcon',
'CircleXIcon-secondary',

View file

@ -33,7 +33,6 @@ const {
TableSwitchRow,
} = Design
// TODO(plugins/settings): Add filter options
export default function FilterAndSortActionSheet({
filters,
filter,