2023-03-15 17:42:12 +08:00
|
|
|
import { action } from "@ember/object";
|
2023-10-11 02:38:59 +08:00
|
|
|
import { observes } from "@ember-decorators/object";
|
2019-11-12 02:34:01 +08:00
|
|
|
import { INPUT_DELAY } from "discourse-common/config/environment";
|
2020-12-18 21:18:52 +08:00
|
|
|
import discourseDebounce from "discourse-common/lib/debounce";
|
2023-10-11 02:38:59 +08:00
|
|
|
import AdminEmailLogsController from "admin/controllers/admin-email-logs";
|
|
|
|
import IncomingEmail from "admin/models/incoming-email";
|
2016-01-19 07:57:55 +08:00
|
|
|
|
2023-03-15 17:42:12 +08:00
|
|
|
export default class AdminEmailReceivedController extends AdminEmailLogsController {
|
2020-01-17 01:56:53 +08:00
|
|
|
@observes("filter.{status,from,to,subject}")
|
2020-12-18 21:18:52 +08:00
|
|
|
filterIncomingEmails() {
|
|
|
|
discourseDebounce(this, this.loadLogs, IncomingEmail, INPUT_DELAY);
|
2023-03-15 17:42:12 +08:00
|
|
|
}
|
2019-02-27 00:53:52 +08:00
|
|
|
|
2023-03-15 17:42:12 +08:00
|
|
|
@action
|
|
|
|
loadMore() {
|
|
|
|
this.loadLogs(IncomingEmail, true);
|
|
|
|
}
|
|
|
|
}
|