parent
21410b217f
commit
5d66abdbd4
|
@ -2,7 +2,6 @@
|
|||
(:require [reagent.core :as reagent]
|
||||
[status-im.ui.components.icons.icons :as icons]
|
||||
[status-im.ui.components.list.styles :as styles]
|
||||
[status-im.ui.components.radio :as radio]
|
||||
[status-im.ui.components.react :as react]
|
||||
[status-im.utils.platform :as platform]
|
||||
["react-native" :as react-native]))
|
||||
|
@ -56,11 +55,10 @@
|
|||
|
||||
;;TODO DEPRECATED, use status-im.ui.components.list-item.views
|
||||
(defn list-item-with-radio-button
|
||||
[{:keys [on-value-change style checked?] :as props} item]
|
||||
[{:keys [on-value-change style checked?]} item]
|
||||
[react/touchable-highlight {:on-press #(on-value-change (not checked?))}
|
||||
(conj item
|
||||
[react/view {:style (merge style styles/item-checkbox)}
|
||||
[radio/radio (:checked? props)]])])
|
||||
[react/view {:style (merge style styles/item-checkbox)}])])
|
||||
|
||||
(def memo-wrap-render-fn
|
||||
(memoize
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
(ns status-im.ui.components.radio
|
||||
(:require [status-im.ui.components.react :as react]
|
||||
[status-im.ui.components.colors :as colors]))
|
||||
|
||||
(defn radio [selected?]
|
||||
[react/view {:style {:width 20 :height 20 :border-radius 10 :align-items :center :justify-content :center
|
||||
:background-color (if selected? colors/blue colors/gray-lighter)}}
|
||||
(when selected?
|
||||
[react/view {:style {:width 12 :height 12 :border-radius 6
|
||||
:background-color colors/white-persist}}])])
|
|
@ -7,7 +7,6 @@
|
|||
[reagent.core :as reagent]
|
||||
[status-im.chat.models.pin-message :as models.pin-message]
|
||||
[status-im.ui.components.list.views :as list]
|
||||
[status-im.ui.components.radio :as radio]
|
||||
[status-im.utils.handlers :refer [<sub]]
|
||||
[status-im.ui.screens.chat.message.message :as message]))
|
||||
|
||||
|
@ -39,7 +38,7 @@
|
|||
[react/view {:style {:position :absolute
|
||||
:right 18
|
||||
:padding-top 4}}
|
||||
[radio/radio (= @selected-unpin message-id)]]]])
|
||||
[quo/radio {:value (= @selected-unpin message-id)}]]]])
|
||||
|
||||
(def list-key-fn #(or (:message-id %) (:value %)))
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
[status-im.ui.components.icons.icons :as icons]
|
||||
[status-im.ui.components.list.views :as list]
|
||||
[status-im.ui.components.react :as react]
|
||||
[status-im.ui.components.radio :as radio]
|
||||
[status-im.ui.components.colors :as colors]
|
||||
[status-im.ui.screens.offline-messaging-settings.styles :as styles]
|
||||
[status-im.ui.screens.profile.components.views :as profile.components]
|
||||
[status-im.ui.components.topbar :as topbar]))
|
||||
[status-im.ui.components.topbar :as topbar]
|
||||
[quo.core :as quo]))
|
||||
|
||||
(defn pinned-state [pinned?]
|
||||
[react/view {:style styles/automatic-selection-container}
|
||||
|
@ -42,7 +42,7 @@
|
|||
name]
|
||||
|
||||
(if pinned?
|
||||
[radio/radio connected?]
|
||||
[quo/radio {:value connected?}]
|
||||
[icons/icon :check {:color colors/blue}])]])))
|
||||
|
||||
(views/defview offline-messaging-settings []
|
||||
|
|
Loading…
Reference in New Issue