Fix for infinite reload in mime picker when automatic update is enabled

This commit is contained in:
simon987 2022-01-22 13:30:48 -05:00
parent 727b57b78a
commit b799a2e976
5 changed files with 27 additions and 16 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,8 @@ export default {
data() { data() {
return { return {
mimeTree: null, mimeTree: null,
stashedMimeTreeAttributes: null stashedMimeTreeAttributes: null,
updateBusy: false
} }
}, },
mounted() { mounted() {
@ -34,6 +35,10 @@ export default {
return; return;
} }
if (this.updateBusy) {
return;
}
this.$store.commit("setSelectedMimeTypes", getSelectedTreeNodes(this.mimeTree)); this.$store.commit("setSelectedMimeTypes", getSelectedTreeNodes(this.mimeTree));
}, },
updateTree() { updateTree() {
@ -42,6 +47,11 @@ export default {
return; return;
} }
if (this.updateBusy) {
return
}
this.updateBusy = true;
if (this.stashedMimeTreeAttributes === null) { if (this.stashedMimeTreeAttributes === null) {
this.stashedMimeTreeAttributes = getTreeNodeAttributes(this.mimeTree); this.stashedMimeTreeAttributes = getTreeNodeAttributes(this.mimeTree);
} }
@ -78,6 +88,7 @@ export default {
} }
}); });
this.stashedMimeTreeAttributes = null; this.stashedMimeTreeAttributes = null;
this.updateBusy = false;
}); });
}, },

File diff suppressed because one or more lines are too long