PHRAS-3664 always send event even if in the same collection (#4024)

This commit is contained in:
Aina Sitraka
2023-01-12 11:41:34 +03:00
committed by GitHub
parent 5d9f4ed84c
commit b4c6712ec3

View File

@@ -566,6 +566,8 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
public function move_to_collection(collection $collection, appbox $appbox = null) public function move_to_collection(collection $collection, appbox $appbox = null)
{ {
if ($this->getCollection()->get_base_id() === $collection->get_base_id()) { if ($this->getCollection()->get_base_id() === $collection->get_base_id()) {
$this->dispatch(RecordEvents::COLLECTION_CHANGED, new CollectionChangedEvent($this, $collection, $collection));
return $this; return $this;
} }