|
|
|
@ -303,8 +303,9 @@ export default class FiltersStorage {
@@ -303,8 +303,9 @@ export default class FiltersStorage {
|
|
|
|
|
filter.include_peers = filter.pinned_peers.concat(filter.include_peers); |
|
|
|
|
filter.includePeerIds = filter.pinnedPeerIds.concat(filter.includePeerIds); |
|
|
|
|
|
|
|
|
|
if(this.filters[filter.id]) { |
|
|
|
|
Object.assign(this.filters[filter.id], filter); |
|
|
|
|
const oldFilter = this.filters[filter.id]; |
|
|
|
|
if(oldFilter) { |
|
|
|
|
Object.assign(oldFilter, filter); |
|
|
|
|
} else { |
|
|
|
|
this.filters[filter.id] = filter; |
|
|
|
|
} |
|
|
|
@ -313,6 +314,8 @@ export default class FiltersStorage {
@@ -313,6 +314,8 @@ export default class FiltersStorage {
|
|
|
|
|
|
|
|
|
|
if(update) { |
|
|
|
|
this.rootScope.dispatchEvent('filter_update', filter); |
|
|
|
|
} else if(!oldFilter) { |
|
|
|
|
this.rootScope.dispatchEvent('filter_new', filter); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|