1
0
Fork 0

publish notice count at the end of the update cycle

Dieser Commit ist enthalten in:
angusmcleod 2021-11-18 17:07:15 +08:00
Ursprung e1a746ca28
Commit fac8d821cf
3 geänderte Dateien mit 2 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -29,7 +29,6 @@ export default Controller.extend({
CustomWizardNotice.list({ page, include_all: true }) CustomWizardNotice.list({ page, include_all: true })
.then((result) => { .then((result) => {
console.log('loadMoreNotices result', result);
if (result.notices.length === 0) { if (result.notices.length === 0) {
this.set("canLoadMore", false); this.set("canLoadMore", false);
return; return;

Datei anzeigen

@ -14,7 +14,6 @@ export default Controller.extend({
this.messageBus.subscribe("/custom-wizard/notices", (data) => { this.messageBus.subscribe("/custom-wizard/notices", (data) => {
if (isPresent(data.active_notice_count)) { if (isPresent(data.active_notice_count)) {
this.set("activeNoticeCount", data.active_notice_count); this.set("activeNoticeCount", data.active_notice_count);
console.log('adminWizards resetting');
this.adminWizardsNotices.setProperties({ this.adminWizardsNotices.setProperties({
notices: A(), notices: A(),
page: 0, page: 0,

Datei anzeigen

@ -159,9 +159,9 @@ class CustomWizard::Notice
notice.retrieved_at = DateTime.now.iso8601(3) notice.retrieved_at = DateTime.now.iso8601(3)
notice.save notice.save
end end
publish_notice_count
end end
publish_notice_count
end end
def self.publish_notice_count def self.publish_notice_count
@ -233,8 +233,6 @@ class CustomWizard::Notice
) )
notice.save notice.save
end end
publish_notice_count
end end
def self.request_plugin_status? def self.request_plugin_status?