File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ in case of vulnerabilities.
2222
2323## [ Unreleased]
2424
25+ ### Fixed
26+ - Fixed issue about ` headers ` option not working from ** Android** [ #16 ] ( https://github.com/proyecto26/nativescript-inappbrowser/issues/16 ) .
27+
2528## [ 2.1.0] - 2019-11-13
2629### Added
2730- Added support for ` automatic ` modal presentation style from ** iOS** .
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ class InAppBrowserModule extends java.lang.Object {
9595 return Promise . reject ( new Error ( InAppBrowserModule . ERROR_CODE ) ) ;
9696 }
9797
98- const options = getDefaultOptions ( url , inAppBrowserOptions ) ;
98+ const options : InAppBrowserOptions = getDefaultOptions ( url , inAppBrowserOptions ) ;
9999
100100 const builder = new CustomTabsIntent . Builder ( ) ;
101101 if ( options [ InAppBrowserModule . KEY_TOOLBAR_COLOR ] ) {
@@ -131,7 +131,7 @@ class InAppBrowserModule extends java.lang.Object {
131131 const customTabsIntent = builder . build ( ) ;
132132
133133 const keyHeaders = options [ InAppBrowserModule . KEY_HEADERS ] ;
134- if ( keyHeaders && keyHeaders . length ) {
134+ if ( keyHeaders ) {
135135 const headers = new Bundle ( ) ;
136136 for ( const key in keyHeaders ) {
137137 if ( keyHeaders . hasOwnProperty ( key ) ) {
Original file line number Diff line number Diff line change @@ -24,14 +24,15 @@ export type RedirectResult = {
2424
2525export type AuthSessionResult = RedirectResult | BrowserResult ;
2626
27- export function getDefaultOptions ( url , options ) {
27+ export function getDefaultOptions ( url : string , options : any ) {
2828 return {
2929 ...options ,
3030 url,
3131 dismissButtonStyle : options . dismissButtonStyle || 'close' ,
32- readerMode : options . readerMode !== undefined ? options . readerMode : false ,
32+ readerMode : ! ! options . readerMode ,
3333 animated : options . animated !== undefined ? options . animated : true ,
34- modalEnabled : options . modalEnabled !== undefined ? options . modalEnabled : true
34+ modalEnabled : options . modalEnabled !== undefined ? options . modalEnabled : true ,
35+ enableBarCollapsing : ! ! options . enableBarCollapsing
3536 } ;
3637}
3738
You can’t perform that action at this time.
0 commit comments