mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 06:56:01 +08:00
FIX: tag filter was not selected on page load
This commit is contained in:
parent
55fd18e195
commit
4ad3a258d1
|
@ -14,6 +14,7 @@ export default Ember.Controller.extend({
|
||||||
bulkSelectEnabled: Em.computed.alias('userTopicsList.bulkSelectEnabled'),
|
bulkSelectEnabled: Em.computed.alias('userTopicsList.bulkSelectEnabled'),
|
||||||
pmTags: Em.computed.alias('userTopicsList.model.topic_list.pm_tags'),
|
pmTags: Em.computed.alias('userTopicsList.model.topic_list.pm_tags'),
|
||||||
pmTaggingEnabled: Ember.computed.alias('site.can_tag_pms'),
|
pmTaggingEnabled: Ember.computed.alias('site.can_tag_pms'),
|
||||||
|
tagId: null,
|
||||||
|
|
||||||
showNewPM: function(){
|
showNewPM: function(){
|
||||||
return this.get('user.viewingSelf') &&
|
return this.get('user.viewingSelf') &&
|
||||||
|
|
|
@ -2,6 +2,7 @@ import createPMRoute from "discourse/routes/build-private-messages-route";
|
||||||
|
|
||||||
export default createPMRoute('tags', 'private-messages-tags').extend({
|
export default createPMRoute('tags', 'private-messages-tags').extend({
|
||||||
model(params) {
|
model(params) {
|
||||||
|
this.controllerFor('user-private-messages').set('tagId', params.id);
|
||||||
const username = this.modelFor("user").get("username_lower");
|
const username = this.modelFor("user").get("username_lower");
|
||||||
return this.store.findFiltered("topicList", {
|
return this.store.findFiltered("topicList", {
|
||||||
filter: `topics/private-messages-tag/${username}/${params.id}`
|
filter: `topics/private-messages-tag/${username}/${params.id}`
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if pmTaggingEnabled}}
|
{{#if pmTaggingEnabled}}
|
||||||
{{pm-tag-drop pmTags=pmTags}}
|
{{pm-tag-drop pmTags=pmTags tagId=tagId}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user