Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Merge branch 'pu/ccheng/2022.11/fix_delete_node' into '2022.11'
Browse files Browse the repository at this point in the history
fix(Filmanager/js): remove virtual nodes after deleted uploaded nodes

See merge request tine20/tine20!1868
  • Loading branch information
pschuele committed Mar 9, 2022
2 parents 29b4433 + d616cbe commit 7c4846a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tine20/Filemanager/js/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ Tine.Filemanager.nodeBackendMixin = {
options.success = async function (response) {
const path = _.get(_.find(filter, {field: 'path'}), 'value');
if (path) {
const virtualNodes = await Tine.Tinebase.uploadManager.getChildNodesByPath(path);
const virtualNodes = await Tine.Tinebase.uploadManager.getProcessingNodesByPath(path);

_.each(virtualNodes, (nodeData) => {
if (!_.find(_.map(response.records, 'data'), {name: nodeData.name})) {
response.records.push(new this.recordClass(nodeData));
Expand Down
4 changes: 2 additions & 2 deletions tine20/Tinebase/js/ux/file/UploadManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ Ext.extend(Ext.ux.file.UploadManager, Ext.util.Observable, {
* Tine.Filemanager.nodeBackendMixin.searchRecord method needs all the pending nodeData,
* so that user can switch and see the pending nodes while uploading
*/
async getChildNodesByPath(path) {
async getProcessingNodesByPath(path) {
let tasks = await this.mainChannel.getAllTasks();
tasks = _.filter(tasks, (task) => {
return path === task.args.targetFolderPath;
return path === task.args.targetFolderPath && task.args.nodeData.status !== 'complete';
});
return _.map(tasks, 'args.nodeData');
},
Expand Down

0 comments on commit 7c4846a

Please sign in to comment.