From 5e6939309a036e83c2c8f7f9ed9298caa901a504 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 12 Oct 2022 12:41:27 -0700 Subject: [PATCH] Replace imageUrl with imageUrlV2 in-app Should be a smooth drop-in replacement, we give the field an alias `imageUrl` in the query, so the rest of the app is none the wiser! I didn't test the layer upload cache invalidation, but it seems pretty obvious to me, so ehh I'm just shipping it lmao --- .../WardrobePage/support/AppearanceLayerSupportUploadModal.js | 4 ++++ src/app/WardrobePage/support/PosePickerSupport.js | 2 +- src/app/components/useOutfitAppearance.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/WardrobePage/support/AppearanceLayerSupportUploadModal.js b/src/app/WardrobePage/support/AppearanceLayerSupportUploadModal.js index 03cdd71..8e73056 100644 --- a/src/app/WardrobePage/support/AppearanceLayerSupportUploadModal.js +++ b/src/app/WardrobePage/support/AppearanceLayerSupportUploadModal.js @@ -125,6 +125,10 @@ function AppearanceLayerSupportUploadModal({ item, layer, isOpen, onClose }) { id: `AppearanceLayer:${layer.id}`, fieldName: "imageUrl", }); + apolloClient.cache.evict({ + id: `AppearanceLayer:${layer.id}`, + fieldName: "imageUrlV2", + }); } catch (e) { setIsUploading(false); setUploadError(e); diff --git a/src/app/WardrobePage/support/PosePickerSupport.js b/src/app/WardrobePage/support/PosePickerSupport.js index 7bd377b..8302057 100644 --- a/src/app/WardrobePage/support/PosePickerSupport.js +++ b/src/app/WardrobePage/support/PosePickerSupport.js @@ -54,7 +54,7 @@ function PosePickerSupport({ bodyId swfUrl svgUrl - imageUrl(size: SIZE_600) + imageUrl: imageUrlV2(idealSize: SIZE_600) canvasMovieLibraryUrl } restrictedZones { diff --git a/src/app/components/useOutfitAppearance.js b/src/app/components/useOutfitAppearance.js index f0fe14b..6a87aa9 100644 --- a/src/app/components/useOutfitAppearance.js +++ b/src/app/components/useOutfitAppearance.js @@ -123,7 +123,7 @@ export const appearanceLayerFragment = gql` id svgUrl canvasMovieLibraryUrl - imageUrl(size: SIZE_600) + imageUrl: imageUrlV2(idealSize: SIZE_600) bodyId knownGlitches # For HTML5 & Known Glitches UI zone {