Skip to content

Commit

Permalink
[v1.7.14] Merge pull request #291 from bridge-core/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
solvedDev authored Nov 14, 2020
2 parents 9be50cb + 853cfab commit 306e4d7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
3 changes: 0 additions & 3 deletions app/renderer/src/plugins/CustomComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ export default class ComponentRegistry {

this.registerUpdates.clear()
}
static async reset() {
this.components = {}
}

static set(
MASK: JSONMask,
Expand Down
4 changes: 3 additions & 1 deletion app/renderer/src/plugins/Disposables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ export function set(pluginId: string, disposables: IDisposable[]) {
}

export function clearAll() {
DisposableStore.forEach(disposables => {
DisposableStore.forEach((disposables, pluginId) => {
disposables.forEach(disposable => disposable.dispose())
DisposableStore.delete(pluginId)
})
}

export function clear(pluginId: string) {
DisposableStore.get(pluginId)?.forEach(disposable => disposable.dispose())
DisposableStore.delete(pluginId)
}
11 changes: 7 additions & 4 deletions app/renderer/src/plugins/PluginLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ export default class PluginLoader {
Store.commit('unloadPlugins')
clearAllDisposables()

CommandRegistry.clear()
ComponentRegistry.reset()
resetLoadLocations()
}

Expand Down Expand Up @@ -136,18 +134,23 @@ export default class PluginLoader {
)
)

const globalDisposables: IDisposable[] = []
await Promise.all([
//LOAD CORRECT THEME
ThemeManager.loadTheme(),

//LOAD CUSTOM COMPONENENTS IN PROJECT
this.loadComponents(
path.join(CURRENT.PROJECT_PATH, 'components'),
[]
globalDisposables
),
//LOAD CUSTOM COMMANDS IN PROJECT
loadCustomCommands(path.join(CURRENT.PROJECT_PATH, 'commands'), []),
loadCustomCommands(
path.join(CURRENT.PROJECT_PATH, 'commands'),
globalDisposables
),
])
setDisposables('bridge.core', globalDisposables)

//Update files using custom commands/components
await ComponentRegistry.updateFiles(getCommandFiles())
Expand Down
2 changes: 1 addition & 1 deletion app/shared/app_version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* Current bridge. app version
*/
export default 'v1.7.13'
export default 'v1.7.14'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bridge",
"version": "1.7.13",
"version": "1.7.14",
"author": "solvedDev <[email protected]>",
"description": "A powerful add-on editor",
"license": "GNU",
Expand Down

0 comments on commit 306e4d7

Please sign in to comment.