Remove deprecated `Ember.Set`
This commit is contained in:
parent
52e25c9272
commit
229566fc32
|
@ -66,7 +66,7 @@ export default Ember.ArrayController.extend({
|
|||
reset: function() {
|
||||
this.clear();
|
||||
this.set('messagesByTemplate', {});
|
||||
this.set('queuedForTyping', new Em.Set());
|
||||
this.set('queuedForTyping', []);
|
||||
this.set('checkedMessages', false);
|
||||
},
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ export default ObjectController.extend(Discourse.SelectedPostsCount, {
|
|||
|
||||
init: function() {
|
||||
this._super();
|
||||
this.set('selectedPosts', new Em.Set());
|
||||
this.set('selectedReplies', new Em.Set());
|
||||
this.set('selectedPosts', []);
|
||||
this.set('selectedReplies', []);
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
@ -275,8 +275,7 @@ export default ObjectController.extend(Discourse.SelectedPostsCount, {
|
|||
var selectedPosts = self.get('selectedPosts'),
|
||||
selectedReplies = self.get('selectedReplies'),
|
||||
postStream = self.get('postStream'),
|
||||
toRemove = new Ember.Set();
|
||||
|
||||
toRemove = [];
|
||||
|
||||
Discourse.Post.deleteMany(selectedPosts, selectedReplies);
|
||||
postStream.get('posts').forEach(function (p) {
|
||||
|
|
|
@ -122,8 +122,7 @@ Discourse.PostStream = Em.Object.extend({
|
|||
|
||||
var userFilters = this.get('userFilters');
|
||||
if (!Em.isEmpty(userFilters)) {
|
||||
var userFiltersArray = this.get('userFilters').toArray();
|
||||
if (userFiltersArray.length > 0) { result.username_filters = userFiltersArray.join(","); }
|
||||
result.username_filters = userFilters.join(",");
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -215,9 +214,9 @@ Discourse.PostStream = Em.Object.extend({
|
|||
this.set('summary', false);
|
||||
this.set('show_deleted', true);
|
||||
if (userFilters.contains(username)) {
|
||||
userFilters.remove(username);
|
||||
userFilters.removeObject(username);
|
||||
} else {
|
||||
userFilters.add(username);
|
||||
userFilters.addObject(username);
|
||||
}
|
||||
return this.refresh();
|
||||
},
|
||||
|
@ -904,9 +903,9 @@ Discourse.PostStream.reopenClass({
|
|||
create: function() {
|
||||
var postStream = this._super.apply(this, arguments);
|
||||
postStream.setProperties({
|
||||
posts: Em.A(),
|
||||
stream: Em.A(),
|
||||
userFilters: Em.Set.create(),
|
||||
posts: [],
|
||||
stream: [],
|
||||
userFilters: [],
|
||||
postIdentityMap: Em.Map.create(),
|
||||
summary: false,
|
||||
loaded: false,
|
||||
|
|
Loading…
Reference in New Issue