expanded fix

pull/4346/head
filip mertens 11 months ago
parent 1bbe4bbcaf
commit 068282935c
  1. 1
      apps/remix-ide/src/app/panels/file-panel.js
  2. 7
      libs/remix-ui/workspace/src/lib/actions/events.ts

@ -234,7 +234,6 @@ module.exports = class Filepanel extends ViewPlugin {
}
isExpanded(path) {
console.log('isExpanded', path, this.expandPath)
if(path === '/') return true
return this.expandPath.includes(path)
}

@ -175,11 +175,13 @@ const removePluginActions = (plugin, cb: (err: Error, result?: string | number |
}
const fileAdded = async (filePath: string) => {
/*
const path = extractParentFromKey(filePath) || ROOT_PATH
console.log('fileAdded', filePath, path)
const isExpanded = await plugin.call('filePanel', 'isExpanded', path)
if(!isExpanded) return
*/
await dispatch(fileAddedSuccess(filePath))
if (filePath.includes('_test.sol')) {
@ -190,13 +192,14 @@ const fileAdded = async (filePath: string) => {
const folderAdded = async (folderPath: string) => {
const provider = plugin.fileManager.currentFileProvider()
const path = extractParentFromKey(folderPath) || ROOT_PATH
/*
const isExpanded = await plugin.call('filePanel', 'isExpanded', path)
console.log('folderAdded', folderPath, path, isExpanded)
if(!isExpanded) return
*/
const promise: Promise<FileTree> = new Promise((resolve) => {
provider.resolveDirectory(path, (error, fileTree: FileTree) => {
if (error) console.error(error)

Loading…
Cancel
Save