Skip to content

Commit 3f46a19

Browse files
Merge pull request #307 from rdkcentral/dev
Release of v4.8.2
2 parents 6d23940 + c6fd58f commit 3f46a19

File tree

9 files changed

+59
-16
lines changed

9 files changed

+59
-16
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## v4.8.2
4+
5+
*21 mar 2022*
6+
7+
- Fixed bug in initialization of Colors plugin when receiving an object instead of a file path
8+
- Improved calculation of alpha values in Colors plugin
9+
- Fixed bug in beforeEachRoute of Router plugin
10+
311
## v4.8.1
412

513
*13 dec 2021*

docs/changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# Changelog
22

3+
## v4.8.2
4+
5+
*21 mar 2022*
6+
7+
- Fixed bug in initialization of Colors plugin when receiving an object instead of a file path
8+
- Improved calculation of alpha values in Colors plugin
9+
- Fixed bug in beforeEachRoute of Router plugin
10+
311
## v4.8.1
412

513
*13 dec 2021*
614

715
- Fixed auto detect 720p resolution
816

17+
918
## v4.8.0
1019

1120
*7 dec 2021*
@@ -17,6 +26,7 @@
1726
- Added support to accept all characters in hash
1827
- Added `Router.root()` support
1928
- Added `Router.reload()` support
29+
2030
## v4.7.0
2131

2232
*20 oct 2021*

docs/index.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Lightning SDK Reference
2+
3+
4+
The Reference Documentation for Lightning SDK contains detailed descriptions of the Lightning SDK *Plugins* that you can use when you are developing Apps with Lightning SDK.
5+
6+
7+
The available Lightning SDK plugins are, in alphabetical order:
8+
9+
* [FPS Counter](plugins/fpscounter.md)
10+
* [Image](plugins/image.md)
11+
* [Language](plugins/language.md)
12+
* [Lightning](plugins/lightning.md)
13+
* [Log](plugins/log.md)
14+
* [Metrics](plugins/metrics.md)
15+
* [Pin](plugins/pin.md)
16+
* [Profile](plugins/profile.md)
17+
* [Purchase](plugins/purchase.md)
18+
* [Registry](plugins/registry.md)
19+
* [Router](plugins/router/index.md)
20+
* [Settings](plugins/settings.md)
21+
* [Storage](plugins/storage.md)
22+
* [TV](plugins/tv.md)
23+
* [Utils](plugins/utils.md)
24+
* [VersionLabel](plugins/versionlabel.md)
25+
* [VideoPlayer](plugins/videoplayer.md)

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightningjs/sdk",
3-
"version": "4.8.1",
3+
"version": "4.8.2",
44
"license": "Apache-2.0",
55
"scripts": {
66
"postinstall": "node ./scripts/postinstall.js",
@@ -26,7 +26,7 @@
2626
"@michieljs/execute-as-promise": "^1.0.0",
2727
"deepmerge": "^4.2.2",
2828
"localCookie": "github:WebPlatformForEmbedded/localCookie",
29-
"shelljs": "^0.8.4",
29+
"shelljs": "^0.8.5",
3030
"url-polyfill": "^1.1.10",
3131
"whatwg-fetch": "^3.0.0"
3232
},

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightningjs/sdk",
3-
"version": "4.8.1",
3+
"version": "4.8.2",
44
"license": "Apache-2.0",
55
"scripts": {
66
"postinstall": "node ./scripts/postinstall.js",
@@ -26,7 +26,7 @@
2626
"@michieljs/execute-as-promise": "^1.0.0",
2727
"deepmerge": "^4.2.2",
2828
"localCookie": "github:WebPlatformForEmbedded/localCookie",
29-
"shelljs": "^0.8.4",
29+
"shelljs": "^0.8.5",
3030
"url-polyfill": "^1.1.10",
3131
"whatwg-fetch": "^3.0.0"
3232
},

src/Colors/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ export const initColors = file => {
5858
return new Promise((resolve, reject) => {
5959
if (typeof file === 'object') {
6060
addColors(file)
61-
resolve()
61+
return resolve()
6262
}
6363
fetch(file)
6464
.then(response => response.json())
6565
.then(json => {
6666
addColors(json)
67-
resolve()
67+
return resolve()
6868
})
6969
.catch(() => {
7070
const error = 'Colors file ' + file + ' not found'
7171
Log.error(error)
72-
reject(error)
72+
return reject(error)
7373
})
7474
})
7575
}

src/Colors/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const calculateAlpha = (argb, p) => {
6363
let r = ((argb / 65536) | 0) % 256
6464
let g = ((argb / 256) | 0) % 256
6565
let b = argb % 256
66-
return (r << 16) + (g << 8) + b + ((p * 255) | 0) * 16777216
66+
return (r << 16) + (g << 8) + b + (Math.round(p * 255) | 0) * 16777216
6767
}
6868

6969
export const mergeColorAlpha = (c, alpha) => {

src/Router/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ const handleHashChange = async override => {
252252
let result = await beforeEachRoute(getActiveHash(), request)
253253

254254
// test if a local hook is configured for the route
255-
if (route.beforeNavigate) {
255+
if (result && route.beforeNavigate) {
256256
result = await route.beforeNavigate(getActiveHash(), request)
257257
}
258258

0 commit comments

Comments
 (0)