@quenty/contentproviderutils 12.18.0-canary.ae8d76d.0 → 12.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/package.json +10 -10
- package/src/Client/ContentProviderUtils.lua +1 -1
- package/src/Client/ImageLabelLoaded.lua +20 -18
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
# [12.18.0
|
|
6
|
+
# [12.18.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/contentproviderutils@12.17.3...@quenty/contentproviderutils@12.18.0) (2025-05-10)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @quenty/contentproviderutils
|
|
9
9
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/contentproviderutils",
|
|
3
|
-
"version": "12.18.0
|
|
3
|
+
"version": "12.18.0",
|
|
4
4
|
"description": "Utility functions to ensure that content is preloaded (wrapping calls in promises)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"Quenty"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@quenty/baseobject": "10.
|
|
31
|
-
"@quenty/instanceutils": "13.18.0
|
|
32
|
-
"@quenty/loader": "10.
|
|
33
|
-
"@quenty/maid": "3.
|
|
34
|
-
"@quenty/promise": "10.11.0
|
|
35
|
-
"@quenty/rx": "13.18.0
|
|
36
|
-
"@quenty/signal": "7.
|
|
37
|
-
"@quenty/valueobject": "13.18.0
|
|
30
|
+
"@quenty/baseobject": "^10.9.0",
|
|
31
|
+
"@quenty/instanceutils": "^13.18.0",
|
|
32
|
+
"@quenty/loader": "^10.9.0",
|
|
33
|
+
"@quenty/maid": "^3.5.0",
|
|
34
|
+
"@quenty/promise": "^10.11.0",
|
|
35
|
+
"@quenty/rx": "^13.18.0",
|
|
36
|
+
"@quenty/signal": "^7.11.0",
|
|
37
|
+
"@quenty/valueobject": "^13.18.0"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "20cff952c2cf06b959f2f11d2293bdef38acc604"
|
|
43
43
|
}
|
|
@@ -108,25 +108,27 @@ function ImageLabelLoaded:SetImageLabel(imageLabel: ImageLabel?)
|
|
|
108
108
|
end))
|
|
109
109
|
|
|
110
110
|
-- Setup preloading as necessary
|
|
111
|
-
maid:GiveTask(self._preloadImage
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
111
|
+
maid:GiveTask(self._preloadImage
|
|
112
|
+
:Observe()
|
|
113
|
+
:Pipe({
|
|
114
|
+
Rx.switchMap(function(preload)
|
|
115
|
+
if preload then
|
|
116
|
+
return Rx.combineLatest({
|
|
117
|
+
isLoaded = self._isLoaded:Observe(),
|
|
118
|
+
image = RxInstanceUtils.observeProperty(self._imageLabel, "Image"),
|
|
119
|
+
})
|
|
120
|
+
else
|
|
121
|
+
return Rx.EMPTY
|
|
122
|
+
end
|
|
123
|
+
end),
|
|
124
|
+
})
|
|
125
|
+
:Subscribe(function(state)
|
|
126
|
+
if not state.isLoaded and state.image ~= "" then
|
|
127
|
+
maid:GivePromise(ContentProviderUtils.promisePreload({ self._imageLabel })):Then(function()
|
|
126
128
|
self._isLoaded.Value = true
|
|
127
129
|
end)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
end
|
|
131
|
+
end))
|
|
130
132
|
else
|
|
131
133
|
self._isLoaded.Value = false
|
|
132
134
|
end
|
|
@@ -136,4 +138,4 @@ function ImageLabelLoaded:SetImageLabel(imageLabel: ImageLabel?)
|
|
|
136
138
|
self._maid._imageLabelMaid = maid
|
|
137
139
|
end
|
|
138
140
|
|
|
139
|
-
return ImageLabelLoaded
|
|
141
|
+
return ImageLabelLoaded
|