From f87768f1fe54f468e38c5f16721cef669f583768 Mon Sep 17 00:00:00 2001 From: andrey Date: Wed, 15 May 2024 13:57:44 +0200 Subject: [PATCH] Hide browser behind feature flag #20022 --- src/legacy/status_im/browser/core.cljs | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/legacy/status_im/browser/core.cljs b/src/legacy/status_im/browser/core.cljs index a484fa93f1f..410bc843196 100644 --- a/src/legacy/status_im/browser/core.cljs +++ b/src/legacy/status_im/browser/core.cljs @@ -11,9 +11,11 @@ [legacy.status-im.utils.random :as random] [native-module.core :as native-module] [re-frame.core :as re-frame] + [react-native.core :as react] [react-native.platform :as platform] [status-im.common.json-rpc.events :as json-rpc] [status-im.common.universal-links :as links] + [status-im.config :as config] [status-im.constants :as constants] [status-im.contexts.chat.events :as chat.events] [status-im.navigation.events :as navigation] @@ -302,16 +304,18 @@ :history [normalized-url]}] (if (links/universal-link? normalized-url) {:dispatch [:universal-links/handle-url normalized-url]} - (rf/merge cofx - {:db (assoc db - :browser/options - {:browser-id (:browser-id browser)} - :browser/screen-id :browser)} - (navigation/pop-to-root :shell-stack) - (chat.events/close-chat) - (navigation/change-tab :browser-stack) - (update-browser browser) - (resolve-url nil))))) + (if config/show-not-implemented-features? + (rf/merge cofx + {:db (assoc db + :browser/options + {:browser-id (:browser-id browser)} + :browser/screen-id :browser)} + (navigation/pop-to-root :shell-stack) + (chat.events/close-chat) + (navigation/change-tab :browser-stack) + (update-browser browser) + (resolve-url nil)) + (.openURL ^js react/linking (url/normalize-url url)))))) (rf/defn open-existing-browser "Opens an existing browser with it's history"