mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 21:01:27 -05:00
15 lines
467 B
JavaScript
15 lines
467 B
JavaScript
import computed from 'ember-addons/ember-computed-decorators';
|
|
import PollVoters from 'discourse/plugins/poll/components/poll-voters';
|
|
|
|
export default PollVoters.extend({
|
|
@computed("poll.voters", "pollsVoters")
|
|
canLoadMore(voters, pollsVoters) {
|
|
return pollsVoters.length < voters;
|
|
},
|
|
|
|
@computed("poll.options", "offset")
|
|
voterIds(options) {
|
|
const ids = [].concat(...(options.map(option => option.voter_ids)));
|
|
return this._getIds(ids);
|
|
}
|
|
});
|