add onTagsUpdated similar to onLabelsUpdated
This commit is contained in:
parent
e73779fec1
commit
921b5ca2ce
|
@ -350,15 +350,7 @@ const Article = {
|
||||||
Notify.close();
|
Notify.close();
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
|
|
||||||
if (data) {
|
Headlines.onTagsUpdated(data);
|
||||||
if (Headlines.headlines[data.id]) {
|
|
||||||
Headlines.headlines[data.id].tags = data.tags;
|
|
||||||
}
|
|
||||||
|
|
||||||
App.findAll(`span[data-tags-for="${data.id}"`).forEach((ctr) => {
|
|
||||||
ctr.innerHTML = Article.renderTags(data.id, data.tags);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
App.Error.report(e);
|
App.Error.report(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1240,6 +1240,17 @@ const Headlines = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onTagsUpdated: function (data) {
|
||||||
|
if (data) {
|
||||||
|
if (this.headlines[data.id]) {
|
||||||
|
this.headlines[data.id].tags = data.tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
App.findAll(`span[data-tags-for="${data.id}"`).forEach((ctr) => {
|
||||||
|
ctr.innerHTML = Article.renderTags(data.id, data.tags);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
// TODO: maybe this should cause article to be rendered again, although it might cause flicker etc
|
// TODO: maybe this should cause article to be rendered again, although it might cause flicker etc
|
||||||
onLabelsUpdated: function (data) {
|
onLabelsUpdated: function (data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|
Loading…
Reference in New Issue