|
|
@@ -145,28 +145,8 @@ function addProcessItem(type, data) { |
|
|
|
function updateProcessItem(id, type, data) { |
|
|
|
itemList.forEach(function(item) { |
|
|
|
if (item.id === id) { |
|
|
|
// certain ones override others |
|
|
|
var allowUpdate = false; |
|
|
|
switch (type) { |
|
|
|
case 'progress': |
|
|
|
if (item.type === 'progress') { |
|
|
|
item.type = type; |
|
|
|
item.data = data; |
|
|
|
} |
|
|
|
break; |
|
|
|
case 'upload': |
|
|
|
case 'paste': |
|
|
|
case 'shorten': |
|
|
|
if (item.type !== 'error') { |
|
|
|
item.type = type; |
|
|
|
item.data = data; |
|
|
|
} |
|
|
|
break; |
|
|
|
case 'error': |
|
|
|
item.type = type; |
|
|
|
item.data = data; |
|
|
|
break; |
|
|
|
} |
|
|
|
item.type = type; |
|
|
|
item.data = data; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |