mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 07:38:01 +08:00
FIX: Fix the shortcut shift+p for pinning/unpinning a topic
This commit is contained in:
parent
35496cae4f
commit
d2502bd127
|
@ -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();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user