@quenty/contentproviderutils 6.9.0 → 6.10.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 +16 -0
- package/package.json +6 -5
- package/src/Client/ImageLabelLoaded.lua +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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
|
+
# [6.10.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/contentproviderutils@6.9.0...@quenty/contentproviderutils@6.10.0) (2023-05-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Fix dependencies ([67791a2](https://github.com/Quenty/NevermoreEngine/commit/67791a289c0956bf4947ac81bf792ee56496b3e8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Initial refactor of guis to use ValueObject instead of ValueObject ([723aba0](https://github.com/Quenty/NevermoreEngine/commit/723aba0208cae7e06c9d8bf2d8f0092d042d70ea))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [6.9.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/contentproviderutils@6.8.0...@quenty/contentproviderutils@6.9.0) (2023-05-08)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @quenty/contentproviderutils
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/contentproviderutils",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.0",
|
|
4
4
|
"description": "Utility functions to ensure that content is preloaded (wrapping calls in promises)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -28,15 +28,16 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@quenty/baseobject": "^6.2.1",
|
|
31
|
-
"@quenty/instanceutils": "^7.
|
|
31
|
+
"@quenty/instanceutils": "^7.14.0",
|
|
32
32
|
"@quenty/loader": "^6.2.1",
|
|
33
33
|
"@quenty/maid": "^2.5.0",
|
|
34
34
|
"@quenty/promise": "^6.5.0",
|
|
35
|
-
"@quenty/rx": "^7.
|
|
36
|
-
"@quenty/signal": "^2.
|
|
35
|
+
"@quenty/rx": "^7.11.0",
|
|
36
|
+
"@quenty/signal": "^2.4.0",
|
|
37
|
+
"@quenty/valueobject": "^7.14.0"
|
|
37
38
|
},
|
|
38
39
|
"publishConfig": {
|
|
39
40
|
"access": "public"
|
|
40
41
|
},
|
|
41
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "11058e90e51ea83d3dad6ae9abe59cc19c36b94b"
|
|
42
43
|
}
|
|
@@ -11,6 +11,7 @@ local Maid = require("Maid")
|
|
|
11
11
|
local ContentProviderUtils = require("ContentProviderUtils")
|
|
12
12
|
local RxInstanceUtils = require("RxInstanceUtils")
|
|
13
13
|
local Rx = require("Rx")
|
|
14
|
+
local ValueObject = require("ValueObject")
|
|
14
15
|
|
|
15
16
|
local ImageLabelLoaded = setmetatable({}, BaseObject)
|
|
16
17
|
ImageLabelLoaded.ClassName = "ImageLabelLoaded"
|
|
@@ -19,14 +20,12 @@ ImageLabelLoaded.__index = ImageLabelLoaded
|
|
|
19
20
|
function ImageLabelLoaded.new()
|
|
20
21
|
local self = setmetatable(BaseObject.new(), ImageLabelLoaded)
|
|
21
22
|
|
|
22
|
-
self._isLoaded =
|
|
23
|
-
self._isLoaded.Value = false
|
|
23
|
+
self._isLoaded = ValueObject.new(false, "boolean")
|
|
24
24
|
self._maid:GiveTask(self._isLoaded)
|
|
25
25
|
|
|
26
26
|
self._defaultTimeout = 1
|
|
27
27
|
|
|
28
|
-
self._preloadImage =
|
|
29
|
-
self._preloadImage.Value = true
|
|
28
|
+
self._preloadImage = ValueObject.new(true, "boolean")
|
|
30
29
|
self._maid:GiveTask(self._preloadImage)
|
|
31
30
|
|
|
32
31
|
self.ImageChanged = Signal.new()
|
|
@@ -113,11 +112,11 @@ function ImageLabelLoaded:SetImageLabel(imageLabel)
|
|
|
113
112
|
end))
|
|
114
113
|
|
|
115
114
|
-- Setup preloading as necessary
|
|
116
|
-
maid:GiveTask(
|
|
115
|
+
maid:GiveTask(self._preloadImage:Observe():Pipe({
|
|
117
116
|
Rx.switchMap(function(preload)
|
|
118
117
|
if preload then
|
|
119
118
|
return Rx.combineLatest({
|
|
120
|
-
isLoaded =
|
|
119
|
+
isLoaded = self._isLoaded;
|
|
121
120
|
image = RxInstanceUtils.observeProperty(self._imageLabel, "Image");
|
|
122
121
|
})
|
|
123
122
|
else
|