fixed the fix

This commit is contained in:
Jack 2020-06-24 21:20:35 +01:00
parent a93ba0027c
commit 20a73cafb0

View file

@ -1481,12 +1481,12 @@ function tagsEdit(){
hideBackgroundLoader();
let status = e.data.resultCode;
if(status === 1){
updateResultEditTagsPanelButtons();
showNotification('Tag added',2000);
dbSnapshot.tags.push({
name: inputVal,
id: e.data.id
})
updateResultEditTagsPanelButtons();
updateSettingsPage();
updateFilterTags();
}else if(status === -1){
@ -1501,13 +1501,13 @@ function tagsEdit(){
hideBackgroundLoader();
let status = e.data.resultCode;
if(status === 1){
updateResultEditTagsPanelButtons();
showNotification('Tag updated',2000);
dbSnapshot.tags.forEach(tag => {
if(tag.id === tagid){
tag.name = inputVal;
}
})
updateResultEditTagsPanelButtons();
updateSettingsPage();
updateFilterTags();
}else if(status === -1){
@ -1522,13 +1522,13 @@ function tagsEdit(){
hideBackgroundLoader();
let status = e.data.resultCode;
if(status === 1){
updateResultEditTagsPanelButtons();
showNotification('Tag removed',2000);
dbSnapshot.tags.forEach((tag,index) => {
if(tag.id === tagid){
dbSnapshot.tags.splice(index, 1);
}
})
updateResultEditTagsPanelButtons();
updateSettingsPage();
updateFilterTags();
updateActiveTags();