2023-01-17 15:16:18 +03:00
|
|
|
import Controller from '@ember/controller';
|
|
|
|
import {A} from '@ember/array';
|
|
|
|
import {inject as service} from '@ember/service';
|
|
|
|
import {task} from 'ember-concurrency';
|
|
|
|
import {tracked} from '@glimmer/tracking';
|
|
|
|
|
|
|
|
export default class MentionsController extends Controller {
|
|
|
|
@service store;
|
|
|
|
|
|
|
|
@tracked mentionsList = A([]);
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
super(...arguments);
|
|
|
|
}
|
|
|
|
|
|
|
|
@task
|
|
|
|
*loadMentionsTask() {
|
2023-01-25 01:56:27 +03:00
|
|
|
const mentions = yield this.store.query('mention', {order: 'created_at desc'});
|
2023-01-17 15:16:18 +03:00
|
|
|
this.mentionsList = mentions;
|
|
|
|
}
|
|
|
|
}
|