Merge pull request #3867 from cpradio/fix-pin-unpin-shortcut

FIX: Fix the shortcut shift+p for pinning/unpinning a topic
This commit is contained in:
Régis Hanol 2015-10-20 16:06:21 +02:00
commit e08c9b8c49

View file

@ -374,10 +374,11 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
togglePinnedForUser() {
if (this.get('model.pinned_at')) {
if (this.get('pinned')) {
this.get('content').clearPin();
const topic = this.get('content');
if (topic.get('pinned')) {
topic.clearPin();
} else {
this.get('content').rePin();
topic.rePin();
}
}
},