[#9636] Remove chat menu item and toggle app switching privacy on by default
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
829e41d319
commit
c84c44fe3b
1
.env.e2e
1
.env.e2e
|
@ -18,3 +18,4 @@ STICKERS_ENABLED=1
|
|||
PARTITIONED_TOPIC=0
|
||||
CONTRACT_NODES=1
|
||||
MOBILE_UI_FOR_DESKTOP=1
|
||||
BLANK_PREVIEW=0
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
(merge testnet-networks mainnet-networks sidechain-networks))
|
||||
|
||||
(def default-multiaccount-settings
|
||||
{:preview-privacy? false
|
||||
{:preview-privacy? config/blank-preview?
|
||||
:wallet {:visible-tokens {}}})
|
||||
|
||||
(def currencies
|
||||
|
|
|
@ -139,3 +139,8 @@
|
|||
(multiaccounts.update/update-settings
|
||||
(assoc settings :preview-privacy? private?)
|
||||
{}))))
|
||||
|
||||
(fx/defn switch-preview-privacy-mode-flag
|
||||
[{:keys [db]}]
|
||||
(let [private? (get-in db [:multiaccount :settings :preview-privacy?])]
|
||||
{::blank-preview-flag-changed private?}))
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
[status-im.utils.identicon :as identicon]
|
||||
[status-im.ethereum.eip55 :as eip55]
|
||||
[status-im.popover.core :as popover]
|
||||
[status-im.hardwallet.nfc :as nfc]))
|
||||
[status-im.hardwallet.nfc :as nfc]
|
||||
[status-im.multiaccounts.core :as multiaccounts]))
|
||||
|
||||
(def rpc-endpoint "https://goerli.infura.io/v3/f315575765b14720b32382a61a89341a")
|
||||
(def contract-address "0xfbf4c8e2B41fAfF8c616a0E49Fb4365a5355Ffaf")
|
||||
|
@ -177,7 +178,8 @@
|
|||
(contact/initialize-contacts)
|
||||
(stickers/init-stickers-packs)
|
||||
(mobile-network/on-network-status-change)
|
||||
(chaos-mode/check-chaos-mode))))
|
||||
(chaos-mode/check-chaos-mode)
|
||||
(multiaccounts/switch-preview-privacy-mode-flag))))
|
||||
|
||||
(defn get-new-auth-method [auth-method save-password?]
|
||||
(if save-password?
|
||||
|
@ -252,6 +254,7 @@
|
|||
:mailserver-topics {}
|
||||
:default-mailserver true})
|
||||
(chaos-mode/check-chaos-mode)
|
||||
(multiaccounts/switch-preview-privacy-mode-flag)
|
||||
(when-not platform/desktop?
|
||||
(initialize-wallet nil)))))
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
(ns status-im.ui.screens.add-new.db
|
||||
(:require [cljs.spec.alpha :as spec]
|
||||
status-im.contact.db))
|
||||
|
||||
(spec/def :new/open-dapp (spec/nilable :contact/contact))
|
|
@ -1,9 +0,0 @@
|
|||
(ns status-im.ui.screens.add-new.events
|
||||
(:require [status-im.ui.screens.add-new.models :as models]
|
||||
[status-im.utils.handlers :as handlers]
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:handle-qr-code
|
||||
(fn [cofx [_ data _]]
|
||||
(models/handle-qr-code cofx data)))
|
|
@ -1,20 +0,0 @@
|
|||
(ns status-im.ui.screens.add-new.models
|
||||
(:require [cljs.spec.alpha :as spec]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.i18n :as i18n]
|
||||
[status-im.ui.screens.navigation :as navigation]
|
||||
[status-im.utils.universal-links.core :as universal-links]
|
||||
[status-im.utils.fx :as fx]))
|
||||
|
||||
(fx/defn process-qr-code
|
||||
[cofx data]
|
||||
(if (spec/valid? :global/public-key data)
|
||||
(universal-links/handle-view-profile cofx data)
|
||||
(or (universal-links/handle-url cofx data)
|
||||
{:utils/show-popup {:title (i18n/label :t/unable-to-read-this-code)
|
||||
:content (i18n/label :t/use-valid-qr-code {:data data})
|
||||
:on-dismiss #(re-frame/dispatch [:navigate-to-clean :home])}})))
|
||||
|
||||
(fx/defn handle-qr-code
|
||||
[cofx data]
|
||||
(process-qr-code cofx data))
|
|
@ -1,55 +0,0 @@
|
|||
(ns status-im.ui.screens.add-new.views
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[status-im.i18n :as i18n]
|
||||
[status-im.ui.components.common.common :as common]
|
||||
[status-im.ui.components.list-selection :as list-selection]
|
||||
[status-im.ui.components.react :as react]
|
||||
[status-im.ui.components.toolbar.view :as toolbar]
|
||||
[status-im.utils.platform :as platform]
|
||||
[status-im.ui.components.list-item.views :as list-item]))
|
||||
|
||||
(defn- options-list []
|
||||
[react/view {:flex 1}
|
||||
[list-item/list-item
|
||||
{:theme :action
|
||||
:title (i18n/label :t/start-new-chat)
|
||||
:accessibility-label :start-1-1-chat-button
|
||||
:icon :main-icons/add-contact
|
||||
:on-press #(re-frame/dispatch [:navigate-to :new-chat])}]
|
||||
[common/list-separator]
|
||||
[list-item/list-item
|
||||
{:theme :action
|
||||
:title (i18n/label :t/start-group-chat)
|
||||
:accessibility-label :start-group-chat-button
|
||||
:icon :main-icons/group-chat
|
||||
:on-press #(re-frame/dispatch [:contact.ui/start-group-chat-pressed])}]
|
||||
[common/list-separator]
|
||||
[list-item/list-item
|
||||
{:theme :action
|
||||
:title (i18n/label :t/new-public-group-chat)
|
||||
:accessibility-label :join-public-chat-button
|
||||
:icon :main-icons/public-chat
|
||||
:on-press #(re-frame/dispatch [:navigate-to :new-public-chat])}]
|
||||
(when-not platform/desktop?
|
||||
[common/list-separator]
|
||||
[list-item/list-item
|
||||
{:theme :action
|
||||
:title (i18n/label :t/invite-friends)
|
||||
:accessibility-label :invite-friends-button
|
||||
:icon :main-icons/share
|
||||
:on-press #(list-selection/open-share {:message (i18n/label :t/get-status-at)})}]
|
||||
[common/list-separator]
|
||||
[list-item/list-item
|
||||
{:theme :action
|
||||
:title (i18n/label :t/scan-qr)
|
||||
:accessibility-label :scan-qr-code-button
|
||||
:icon :main-icons/qr
|
||||
:on-press #(re-frame/dispatch [:qr-scanner.ui/scan-qr-code-pressed
|
||||
{:title (i18n/label :t/scan-qr)
|
||||
:handler :handle-qr-code}])}])])
|
||||
|
||||
(defn add-new []
|
||||
[react/view {:flex 1 :background-color :white}
|
||||
[toolbar/simple-toolbar (i18n/label :t/new)]
|
||||
[common/separator]
|
||||
[options-list]])
|
|
@ -13,7 +13,6 @@
|
|||
status-im.mailserver.db
|
||||
status-im.ens.db
|
||||
status-im.browser.db
|
||||
status-im.ui.screens.add-new.db
|
||||
status-im.ui.screens.add-new.new-public-chat.db
|
||||
status-im.ui.components.bottom-sheet.core
|
||||
[status-im.wallet.db :as wallet.db]))
|
||||
|
@ -211,7 +210,6 @@
|
|||
:universal-links/url
|
||||
:browser/browsers
|
||||
:browser/options
|
||||
:new/open-dapp
|
||||
:navigation/screen-params
|
||||
:chat/cooldowns
|
||||
:chat/cooldown-enabled?
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
(ns status-im.ui.screens.events
|
||||
(:require status-im.events
|
||||
status-im.ui.screens.add-new.events
|
||||
status-im.ui.screens.add-new.new-chat.events
|
||||
status-im.ui.screens.group.chat-settings.events
|
||||
status-im.ui.screens.group.events
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(ns status-im.ui.screens.home.sheet.views
|
||||
(:require-macros [status-im.utils.views :refer [defview letsubs] :as views])
|
||||
(:require-macros [status-im.utils.views :refer [defview letsubs]])
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[status-im.i18n :as i18n]
|
||||
[status-im.ui.components.colors :as colors]
|
||||
|
@ -34,14 +34,6 @@
|
|||
:accessibility-label :join-public-chat-button
|
||||
:icon :main-icons/public-chat
|
||||
:on-press #(hide-sheet-and-dispatch [:navigate-to :new-public-chat])}]
|
||||
[list-item/list-item
|
||||
{:theme :action
|
||||
:title :t/scan-qr
|
||||
:accessibility-label :scan-qr-code-button
|
||||
:icon :main-icons/qr
|
||||
:on-press #(hide-sheet-and-dispatch [:qr-scanner.ui/scan-qr-code-pressed
|
||||
{:title (i18n/label :t/scan-qr)
|
||||
:handler :handle-qr-code}])}]
|
||||
[list-item/list-item
|
||||
{:theme :action
|
||||
:title :t/invite-friends
|
||||
|
@ -110,7 +102,7 @@
|
|||
|
||||
(def add-new
|
||||
{:content add-new-view
|
||||
:content-height 320})
|
||||
:content-height 280})
|
||||
|
||||
(def public-chat-actions
|
||||
{:content public-chat-actions-view
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
:chat
|
||||
:select-chat
|
||||
:profile
|
||||
:new
|
||||
:take-picture
|
||||
:new-group
|
||||
:add-participants-toggle-list
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
[status-im.ui.screens.multiaccounts.views :as multiaccounts]
|
||||
[status-im.ui.screens.add-new.new-chat.views :as new-chat]
|
||||
[status-im.ui.screens.add-new.new-public-chat.view :as new-public-chat]
|
||||
[status-im.ui.screens.add-new.views :as add-new]
|
||||
[status-im.ui.screens.bootnodes-settings.edit-bootnode.views
|
||||
:as
|
||||
edit-bootnode]
|
||||
|
@ -119,7 +118,6 @@
|
|||
:chat chat/chat
|
||||
:select-chat chat/select-chat
|
||||
:profile profile.contact/profile
|
||||
:new add-new/add-new
|
||||
:new-chat [:modal new-chat/new-chat]
|
||||
:qr-scanner [:modal qr-scanner/qr-scanner]
|
||||
:new-group group/new-group
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
(def mobile-ui-for-desktop? (enabled? (get-config :MOBILE_UI_FOR_DESKTOP "0")))
|
||||
;; NOTE: only disabled in releases
|
||||
(def local-notifications? (enabled? (get-config :LOCAL_NOTIFICATIONS "1")))
|
||||
(def blank-preview? (enabled? (get-config :BLANK_PREVIEW "1")))
|
||||
|
||||
;; CONFIG VALUES
|
||||
(def log-level
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
[status-im.test.tribute-to-talk.core]
|
||||
[status-im.test.tribute-to-talk.db]
|
||||
[status-im.test.tribute-to-talk.whitelist]
|
||||
[status-im.test.ui.screens.add-new.models]
|
||||
[status-im.test.ui.screens.currency-settings.models]
|
||||
[status-im.test.ui.screens.wallet.db]
|
||||
[status-im.test.utils.async]
|
||||
|
@ -114,7 +113,6 @@
|
|||
'status-im.test.tribute-to-talk.core
|
||||
'status-im.test.tribute-to-talk.db
|
||||
'status-im.test.tribute-to-talk.whitelist
|
||||
'status-im.test.ui.screens.add-new.models
|
||||
'status-im.test.ui.screens.currency-settings.models
|
||||
'status-im.test.ui.screens.wallet.db
|
||||
'status-im.test.utils.async
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
(ns status-im.test.ui.screens.add-new.models
|
||||
(:require [cljs.test :refer-macros [deftest is testing]]
|
||||
[status-im.ui.screens.add-new.models :as models]))
|
||||
|
||||
(def cofx {:db {:multiaccount {:public-key "0x04e1433c1a8ad71280e6d4b1814aa3958ba6eb451da47ea1d4a4bfc4a04969c445548f3bd9d40fa7e4356aa62075b4d7615179ef1332f1d6a7c59b96c4ab8e04c1"}}})
|
||||
|
||||
(deftest test-handle-qr-code
|
||||
(testing "handle contact code"
|
||||
(is (= :profile
|
||||
(get-in (models/handle-qr-code cofx "0x04405dfcf94380f9159a1bf8d7dbfce19dd2a3552695bf5e6dd96fb8c3c016c62adaf036b387e7f68621c366186f59dae2561374752996aa13ffc57aad9e6e7202") [:db :view-id]))))
|
||||
(testing "handle own contact code"
|
||||
(is (= :my-profile
|
||||
(get-in (models/handle-qr-code cofx "0x04e1433c1a8ad71280e6d4b1814aa3958ba6eb451da47ea1d4a4bfc4a04969c445548f3bd9d40fa7e4356aa62075b4d7615179ef1332f1d6a7c59b96c4ab8e04c1") [:db :view-id]))))
|
||||
(testing "handle universal link"
|
||||
(is (= (:browser/show-browser-selection (models/handle-qr-code cofx "status-im://browse/www.cryptokitties.co"))
|
||||
"www.cryptokitties.co")))
|
||||
(testing "handle invalid qr code"
|
||||
(is (:utils/show-popup (models/handle-qr-code cofx "a random string")))))
|
|
@ -508,7 +508,7 @@
|
|||
"help": "help",
|
||||
"help-capitalized": "Help",
|
||||
"help-center": "Help Center",
|
||||
"hide-content-when-switching-apps": "Hide content when switching apps",
|
||||
"hide-content-when-switching-apps": "White out Status when switching apps",
|
||||
"history": "History",
|
||||
"hold-card": "Hold card to the back\n of your phone",
|
||||
"home": "Home",
|
||||
|
|
Loading…
Reference in New Issue