Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-25 18:50:27 +01:00
publish notice count at the end of the update cycle
Dieser Commit ist enthalten in:
Ursprung
e1a746ca28
Commit
fac8d821cf
3 geänderte Dateien mit 2 neuen und 6 gelöschten Zeilen
|
@ -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;
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -159,10 +159,10 @@ class CustomWizard::Notice
|
||||||
notice.retrieved_at = DateTime.now.iso8601(3)
|
notice.retrieved_at = DateTime.now.iso8601(3)
|
||||||
notice.save
|
notice.save
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
publish_notice_count
|
publish_notice_count
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def self.publish_notice_count
|
def self.publish_notice_count
|
||||||
payload = {
|
payload = {
|
||||||
|
@ -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?
|
||||||
|
|
Laden …
In neuem Issue referenzieren