Update folder finder.

This commit is contained in:
Kasen IO 2020-05-21 19:52:43 -04:00
parent 259203dd9b
commit 49cdfd7711
2 changed files with 4 additions and 16 deletions

View file

@ -1143,9 +1143,9 @@ export default {
return null;
},
recursiveFolderPopulate: function(indexToSearch, firstIteration, avoidFolder) {
recursiveFolderPopulate: function(indexToSearch, avoidFolder) {
for (var i = 0; i < indexToSearch.length; i++) {
if (Object.prototype.hasOwnProperty.call(indexToSearch[i], "items") && indexToSearch[i].items.length > 0) {
if (Object.prototype.hasOwnProperty.call(indexToSearch[i], "items")) {
// We want to avoid adding the folder itself and also any child folders it may have, putting a folder within its child folder will nuke it.
if (avoidFolder !== indexToSearch[i].uuid) {
this.recursiveFolderHoldingList.push({
@ -1153,14 +1153,12 @@ export default {
"uuid": indexToSearch[i].uuid,
});
this.recursiveFolderPopulate(indexToSearch[i].items, false, avoidFolder);
this.recursiveFolderPopulate(indexToSearch[i].items, avoidFolder);
}
}
}
if (firstIteration === true) {
return this.recursiveFolderHoldingList;
}
return this.recursiveFolderHoldingList;
},
sendInventory: function() {
this.sendAppMessage("web-to-script-inventory", this.itemsStore );

View file

@ -18,7 +18,6 @@ export const store = new Vuex.Store({
state: {
items: [
{
"hasChildren": false,
"type": "script",
"name": "VRGrabScale",
"url": "https://gooawefaweawfgle.com/vr.js",
@ -110,7 +109,6 @@ export const store = new Vuex.Store({
// "uuid": "54354363wgsegs45ujs",
// },
{
"hasChildren": false,
"type": "script",
"name": "VRGrabScale",
"url": "https://googfdafsgaergale.com/vr.js",
@ -118,7 +116,6 @@ export const store = new Vuex.Store({
"uuid": "54hgfhgf254354353",
},
{
"hasChildren": false,
"type": "script",
"name": "TEST",
"url": "https://gooadfdagle.com/vr.js",
@ -126,7 +123,6 @@ export const store = new Vuex.Store({
"uuid": "542rfwat4t5fsddf4354353",
},
{
"hasChildren": false,
"type": "json",
"name": "TESTJSON",
"url": "https://gooadfdagle.com/vr.json",
@ -134,7 +130,6 @@ export const store = new Vuex.Store({
"uuid": "542rfwat4t54354353",
},
{
"hasChildren": false,
"type": "script",
"name": "TESTLONGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
"url": "https://googfdaffle.com/vrLONGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG.js",
@ -142,7 +137,6 @@ export const store = new Vuex.Store({
"uuid": "5425ggsrg45354353",
},
{
"hasChildren": false,
"type": "whatttype",
"name": "BrokenIcon",
"url": "https://googfdaffle.com/vrLONGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG.js",
@ -150,7 +144,6 @@ export const store = new Vuex.Store({
"uuid": "5425ggsrg4fdaffdff535asdasd4353",
},
{
"hasChildren": false,
"type": "avatar",
"name": "AVI",
"url": "https://googlfadfe.com/vr.fst",
@ -158,7 +151,6 @@ export const store = new Vuex.Store({
"uuid": "542gregg45s3g4354353",
},
{
"hasChildren": false,
"type": "avatar",
"name": "AVI",
"url": "https://googlefdaf.com/vr.fst",
@ -166,7 +158,6 @@ export const store = new Vuex.Store({
"uuid": "5420798-087-54354353",
},
{
"hasChildren": false,
"type": "model",
"name": "3D MODEL",
"url": "https://googlee.com/vr.fbx",
@ -174,7 +165,6 @@ export const store = new Vuex.Store({
"uuid": "54254354980-7667jt353",
},
{
"hasChildren": false,
"type": "place",
"name": "PLACE DOMAIN",
"url": "https://googleee.com/vr.fbx",