From 36e8183c07f1ebb202cbc8538cf48503d44f269a Mon Sep 17 00:00:00 2001 From: Joe Yu Date: Tue, 2 Jun 2020 11:08:43 +0100 Subject: [PATCH] Fix thumbnail calls payload (#6) * Corrected request_thumbnail calls See also https://github.com/shotgunsoftware/tk-framework-qtwidgets/pull/81 * Fixed missing entity for thumbnail_arrived singal_payload See also https://github.com/shotgunsoftware/tk-framework-qtwidgets/pull/81 --- python/activity_stream/data_manager.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/python/activity_stream/data_manager.py b/python/activity_stream/data_manager.py index 71b6550f..783f4593 100644 --- a/python/activity_stream/data_manager.py +++ b/python/activity_stream/data_manager.py @@ -464,39 +464,42 @@ def request_activity_thumbnails(self, activity_id): if entity.get("user.HumanUser.image") and self._sg_data_retriever: uid = self._sg_data_retriever.request_thumbnail( entity["user.HumanUser.image"], - entity["user"]["id"], entity["user"]["type"], + entity["user"]["id"], "image", load_image=True, ) self._thumb_map[uid] = { "activity_id": activity_id, + "entity": entity, "thumbnail_type": self.THUMBNAIL_CREATED_BY, } elif entity.get("user.ClientUser.image") and self._sg_data_retriever: uid = self._sg_data_retriever.request_thumbnail( entity["user.ClientUser.image"], - entity["user"]["id"], entity["user"]["type"], + entity["user"]["id"], "image", load_image=True, ) self._thumb_map[uid] = { "activity_id": activity_id, + "entity": entity, "thumbnail_type": self.THUMBNAIL_CREATED_BY, } elif entity.get("user.ApiUser.image") and self._sg_data_retriever: uid = self._sg_data_retriever.request_thumbnail( entity["user.ApiUser.image"], - entity["user"]["id"], entity["user"]["type"], + entity["user"]["id"], "image", load_image=True, ) self._thumb_map[uid] = { "activity_id": activity_id, + "entity": entity, "thumbnail_type": self.THUMBNAIL_CREATED_BY, } @@ -515,6 +518,7 @@ def request_activity_thumbnails(self, activity_id): ) self._thumb_map[uid] = { "activity_id": activity_id, + "entity": entity, "thumbnail_type": self.THUMBNAIL_CREATED_BY, } @@ -526,6 +530,7 @@ def request_activity_thumbnails(self, activity_id): ) self._thumb_map[uid] = { "activity_id": activity_id, + "entity": entity, "thumbnail_type": self.THUMBNAIL_ENTITY, }