Skip to content

Commit

Permalink
Merge pull request #18 from proyecto26/release/v2.1.1
Browse files Browse the repository at this point in the history
Release v2.1.1
  • Loading branch information
jdnichollsc authored Nov 15, 2019
2 parents 8f24f27 + 209b16a commit 38d24fc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ in case of vulnerabilities.

## [Unreleased]

## [2.1.1] - 2019-11-14
### Fixed
- Fixed issue about `headers` option not working from **Android** [#16](https://github.com/proyecto26/nativescript-inappbrowser/issues/16).

## [2.1.0] - 2019-11-13
### Added
- Added support for `automatic` modal presentation style from **iOS**.
Expand Down Expand Up @@ -52,7 +56,8 @@ in case of vulnerabilities.
- Methods to open and close external urls to authenticate the user **(openAuth, closeAuth)** using deep linking.
- `isAvailable` method to detect if the device supports the plugin.

[Unreleased]: https://github.com/proyecto26/nativescript-inappbrowser/compare/v2.1.0...HEAD
[Unreleased]: https://github.com/proyecto26/nativescript-inappbrowser/compare/v2.1.1...HEAD
[2.1.1]: https://github.com/proyecto26/nativescript-inappbrowser/compare/v2.1.0...v2.1.1
[2.1.0]: https://github.com/proyecto26/nativescript-inappbrowser/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/proyecto26/nativescript-inappbrowser/compare/v1.0.0...v2.0.0
[1.0.0]: https://github.com/proyecto26/nativescript-inappbrowser/releases/tag/v1.0.0
4 changes: 2 additions & 2 deletions src/InAppBrowser.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class InAppBrowserModule extends java.lang.Object {
return Promise.reject(new Error(InAppBrowserModule.ERROR_CODE));
}

const options = getDefaultOptions(url, inAppBrowserOptions);
const options: InAppBrowserOptions = getDefaultOptions(url, inAppBrowserOptions);

const builder = new CustomTabsIntent.Builder();
if (options[InAppBrowserModule.KEY_TOOLBAR_COLOR]) {
Expand Down Expand Up @@ -131,7 +131,7 @@ class InAppBrowserModule extends java.lang.Object {
const customTabsIntent = builder.build();

const keyHeaders = options[InAppBrowserModule.KEY_HEADERS];
if (keyHeaders && keyHeaders.length) {
if (keyHeaders) {
const headers = new Bundle();
for (const key in keyHeaders) {
if (keyHeaders.hasOwnProperty(key)) {
Expand Down
7 changes: 4 additions & 3 deletions src/InAppBrowser.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ export type RedirectResult = {

export type AuthSessionResult = RedirectResult | BrowserResult;

export function getDefaultOptions(url, options) {
export function getDefaultOptions(url: string, options: any) {
return {
...options,
url,
dismissButtonStyle: options.dismissButtonStyle || 'close',
readerMode: options.readerMode !== undefined ? options.readerMode : false,
readerMode: !!options.readerMode,
animated: options.animated !== undefined ? options.animated : true,
modalEnabled: options.modalEnabled !== undefined ? options.modalEnabled : true
modalEnabled: options.modalEnabled !== undefined ? options.modalEnabled : true,
enableBarCollapsing: !!options.enableBarCollapsing
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-inappbrowser",
"version": "2.1.0",
"version": "2.1.1",
"description": "InAppBrowser for NativeScript",
"main": "InAppBrowser",
"typings": "index.d.ts",
Expand Down

0 comments on commit 38d24fc

Please sign in to comment.