FIX: group notification drop down not populated on user page

This commit is contained in:
Sam 2015-12-31 15:49:32 +11:00
parent 01281b6364
commit fcf1777ddf

View File

@ -8,6 +8,13 @@ export default createPMRoute('groups', 'private-messages-groups').extend({
});
},
afterModel(model) {
const groupName = _.last(model.get("filter").split('/'));
const groups = this.modelFor("user").get("groups");
const group = _.first(groups.filterBy("name", groupName));
this.controllerFor("user-private-messages").set("group", group);
},
setupController(controller, model) {
this._super.apply(this, arguments);
const group = _.last(model.get("filter").split('/'));