mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
For @Sam - hide the poster expansion if you click on the avatar of the user who's expanded
This commit is contained in:
parent
ae72724648
commit
ea9398467b
@ -24,11 +24,14 @@ Discourse.PosterExpansionController = Discourse.ObjectController.extend({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentUsername = this.get('username');
|
var currentPostId = this.get('id');
|
||||||
this.setProperties({model: post, visible: true});
|
this.setProperties({model: post, visible: true});
|
||||||
|
|
||||||
// If we're showing the same user we showed last time, just keep it
|
// If we're showing the same user we showed last time, just keep it
|
||||||
if (post.get('username') === currentUsername) { return; }
|
if (post.get('id') === currentPostId) {
|
||||||
|
this.setProperties({ visible: false, model: null });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.set('participant', null);
|
this.set('participant', null);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user