mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 06:39:57 +08:00
Rename discussion.lastPostedUser
This commit is contained in:
@ -14,7 +14,7 @@ Object.assign(Discussion.prototype, {
|
||||
firstPost: Model.hasOne('firstPost'),
|
||||
|
||||
lastTime: Model.attribute('lastTime', Model.transformDate),
|
||||
lastUser: Model.hasOne('lastUser'),
|
||||
lastPostedUser: Model.hasOne('lastPostedUser'),
|
||||
lastPost: Model.hasOne('lastPost'),
|
||||
lastPostNumber: Model.attribute('lastPostNumber'),
|
||||
|
||||
|
@ -87,7 +87,7 @@ export default class DiscussionList extends Component {
|
||||
* @api
|
||||
*/
|
||||
requestParams() {
|
||||
const params = {include: ['user', 'lastUser'], filter: {}};
|
||||
const params = {include: ['user', 'lastPostedUser'], filter: {}};
|
||||
|
||||
params.sort = this.sortMap()[this.props.params.sort];
|
||||
|
||||
|
@ -15,7 +15,7 @@ export default class TerminalPost extends Component {
|
||||
const discussion = this.props.discussion;
|
||||
const lastPost = this.props.lastPost && discussion.repliesCount();
|
||||
|
||||
const user = discussion[lastPost ? 'lastUser' : 'user']();
|
||||
const user = discussion[lastPost ? 'lastPostedUser' : 'user']();
|
||||
const time = discussion[lastPost ? 'lastTime' : 'startTime']();
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user