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