-
Notifications
You must be signed in to change notification settings - Fork 4
Reloading registries
UNITADE provides several functionalities to work with Obsidian's registry; one of them is the so-called "Reload" functionality. This feature causes every other method to be applied in a specific order, meaning it clears the entire extensions registry (only extensions), loads the default extensions registry, and then applies UNITADE's registry configuration on top of it, "stacking" registries one upon another.
Upon clicking, this button clears every extension from the views and extensions registry of your Obsidian Vault, loads the default Obsidian extensions, and then imitates the loading process of the plugin, reading the settings into the registry.
Warning
This process can cause lags and may take some time.
Here is an example code of this trigger-method (it may differ in the source code):
public applyDefaults(): void {
for (const defaultView in CONSTANTS.defaultExtensions) {
this.registerExtensions(CONSTANTS.defaultExtensions[defaultView], defaultView);
}
}
Note
Since this is a public API of UNITADE's core, you can call this method from
other places, like a custom plugin or the developer console. It also triggers
the unapply()
and apply()
API methods before calling its own trigger method.