From a361ba37db72af6f8d63e4f328ab8fb4ea776ef1 Mon Sep 17 00:00:00 2001 From: Jeroen Peeters Date: Fri, 1 Dec 2023 15:33:13 +0100 Subject: [PATCH] fix: persist default settings --- utils.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utils.js b/utils.js index bb55cc5..553adab 100644 --- a/utils.js +++ b/utils.js @@ -102,15 +102,18 @@ async function checkResultAndReturnUrl( export async function openBrowserAsync( url: string, - options?: InAppBrowserOptions = { + options?: InAppBrowserOptions = {} +): Promise { + const defaults = { animated: true, modalEnabled: true, dismissButtonStyle: 'close', readerMode: false, enableBarCollapsing: false, - } -): Promise { + }; + return RNInAppBrowser.open({ + ...defaults, ...options, url, preferredBarTintColor: