removed old unused code and resources

This commit is contained in:
Andrey Shovkoplyas 2017-07-17 16:38:01 +03:00 committed by Roman Volosovskyi
parent 04c047a811
commit 0bf8b711be
36 changed files with 22 additions and 178 deletions

View File

@ -12,7 +12,6 @@
"react-native-action-button",
"react-native-vector-icons/Ionicons",
"react-native-vector-icons/Octicons",
"react-native-circle-checkbox",
"react-native-randombytes",
"dismissKeyboard",
"react-native-linear-gradient",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -49,7 +49,6 @@
"react-native-android-sms-listener": "github:adrian-tiberius/react-native-android-sms-listener#listener-bugfix",
"react-native-autolink": "^0.10.0",
"react-native-camera": "^0.9.4",
"react-native-circle-checkbox": "github:paramoshkinandrew/ReactNativeCircleCheckbox",
"react-native-contacts": "^0.2.4",
"react-native-crypto": "^2.0.1",
"react-native-dialogs": "0.0.16",

View File

@ -4,7 +4,6 @@
(def android-sms-listener (js/require "react-native-android-sms-listener"))
(def autolink (js/require "react-native-autolink"))
(def camera (js/require "react-native-camera"))
(def circle-checkbox (js/require "react-native-circle-checkbox"))
;; TODO see https://github.com/rt2zz/react-native-contacts/issues/45
(def contacts (js/require "react-native-contacts"))
(def dialogs (js/require "react-native-dialogs"))

View File

@ -1,17 +1,5 @@
(ns status-im.react-native.resources)
(def add-icon (js/require "./images/add.png"))
(def att (js/require "./images/att.png"))
(def chat-icon (js/require "./images/chat.png"))
(def icon-close-gray (js/require "./images/icon_close_gray.png"))
(def logo-icon (js/require "./images/logo.png"))
(def nav-back-icon (js/require "./images/nav-back.png"))
(def user-no-photo (js/require "./images/no-photo.png"))
(def online-icon (js/require "./images/online.png"))
(def play (js/require "./images/play.png"))
(def trash-icon (js/require "./images/trash.png"))
(def v (js/require "./images/v.png"))
(def contacts
{:auction-house (js/require "./images/contacts/auction-house.png")
:mkr-market (js/require "./images/contacts/mkr-market.png")

View File

@ -39,8 +39,6 @@
add-contacts-toggle-list
add-participants-toggle-list]]
[status-im.new-group.views.reorder-groups :refer [reorder-groups]]
[status-im.participants.views.add :refer [new-participants]]
[status-im.participants.views.remove :refer [remove-participants]]
[status-im.profile.screen :refer [profile my-profile]]
[status-im.profile.edit.screen :refer [edit-my-profile]]
[status-im.profile.photo-capture.screen :refer [profile-photo-capture]]
@ -125,8 +123,6 @@
(let [component (case current-view
:discover main-tabs
:discover-search-results discover-search-results
:add-participants new-participants
:remove-participants remove-participants
:chat-list main-tabs
:new-chat new-chat
:new-group new-group

View File

@ -85,7 +85,7 @@
(defn message-content-audio [_]
[view st/audio-container
[view st/play-view
[image {:source res/play
[image {;:source res/play
:style st/play-image}]]
[view st/track-container
[view st/track]

View File

@ -14,7 +14,6 @@
status-im.contacts.handlers
status-im.discover.handlers
status-im.new-group.handlers
status-im.participants.handlers
status-im.profile.handlers
status-im.commands.handlers.loading
status-im.commands.handlers.jail

View File

@ -36,8 +36,6 @@
add-participants-toggle-list]]
[status-im.new-group.views.reorder-groups :refer [reorder-groups]]
[status-im.new-group.screen-public :refer [new-public-group]]
[status-im.participants.views.add :refer [new-participants]]
[status-im.participants.views.remove :refer [remove-participants]]
[status-im.profile.screen :refer [profile my-profile]]
[status-im.profile.edit.screen :refer [edit-my-profile]]
[status-im.profile.photo-capture.screen :refer [profile-photo-capture]]
@ -95,8 +93,6 @@
(let [component (case current-view
:discover main-tabs
:discover-search-results discover-search-results
:add-participants new-participants
:remove-participants remove-participants
:chat-list main-tabs
:new-chat new-chat
:new-group new-group

View File

@ -358,5 +358,17 @@
(after (delete-group!))
(delete-group))
(defn deselect-participant
[db [_ id]]
(update db :selected-participants disj id))
(register-handler :deselect-participant deselect-participant)
(defn select-participant
[db [_ id]]
(update db :selected-participants conj id))
(register-handler :select-participant select-participant)

View File

@ -10,7 +10,8 @@
list-view
list-item]]
[status-im.components.text-field.view :refer [text-field]]
[status-im.components.styles :refer [color-blue
[status-im.components.styles :refer [icon-ok
color-blue
color-gray4]]
[status-im.components.status-bar :refer [status-bar]]
[status-im.components.toolbar.view :refer [toolbar]]
@ -27,8 +28,10 @@
[status-bar]
[toolbar
{:title (label :t/new-public-group-chat)
:actions [{:image {:source res/v ;; {:uri "icon_search"}
:style (st/toolbar-icon create-btn-enabled?)}
:actions [{:image {:source {:uri (if create-btn-enabled?
:icon_ok_blue
:icon_ok_disabled)}
:style icon-ok}
:handler (when create-btn-enabled?
#(dispatch [:create-new-public-group topic]))}]}]]))

View File

@ -5,6 +5,9 @@
(reg-sub :is-contact-selected?
(u/contains-sub :selected-contacts))
(reg-sub :is-participant-selected?
(u/contains-sub :selected-participants))
(defn filter-selected-contacts [selected-contacts contacts]
(remove #(true? (:pending? (contacts %))) selected-contacts))

View File

@ -1,24 +0,0 @@
(ns status-im.participants.handlers
(:require [status-im.navigation.handlers :as nav]
[re-frame.core :refer [debug]]
[status-im.utils.handlers :refer [register-handler]]))
(defmethod nav/preload-data! :add-participants
[db _]
(assoc db :selected-participants #{}))
(defmethod nav/preload-data! :remove-participants
[db _]
(assoc db :selected-participants #{}))
(defn deselect-participant
[db [_ id]]
(update db :selected-participants disj id))
(register-handler :deselect-participant deselect-participant)
(defn select-participant
[db [_ id]]
(update db :selected-participants conj id))
(register-handler :select-participant (debug select-participant))

View File

@ -1,24 +0,0 @@
(ns status-im.participants.styles)
(def participants-container
{:flex 1
:backgroundColor :white})
(def participants-list
{:backgroundColor :white})
(def new-participant-image
{:width 20
:height 18})
(def remove-participants-image
{:width 22
:height 30})
(def participant-container
{:flexDirection :row
:marginTop 5
:marginBottom 5
:paddingLeft 15
:paddingRight 15
:height 75})

View File

@ -1,6 +0,0 @@
(ns status-im.participants.subs
(:require [re-frame.core :refer [reg-sub]]
[status-im.utils.subs :as u]))
(reg-sub :is-participant-selected?
(u/contains-sub :selected-participants))

View File

@ -1,33 +0,0 @@
(ns status-im.participants.views.add
(:require-macros [status-im.utils.views :refer [defview]])
(:require [re-frame.core :refer [subscribe dispatch]]
[status-im.react-native.resources :as res]
[status-im.components.react :refer [view list-view list-item]]
[status-im.components.status-bar :refer [status-bar]]
[status-im.components.toolbar.view :refer [toolbar]]
[status-im.utils.listview :refer [to-datasource]]
[status-im.participants.views.contact :refer [participant-contact]]
[status-im.participants.styles :as st]
[status-im.i18n :refer [label]]))
(defn new-participants-toolbar []
[view
[status-bar]
[toolbar
{:title (label :t/add-participants)
:actions [{:image {:source res/v ;; {:uri "icon_search"}
:style st/new-participant-image}
:handler #(do (dispatch [:add-new-participants])
(dispatch [:navigate-back]))}]}]])
(defn new-participants-row
[row _ _]
(list-item [participant-contact row]))
(defview new-participants []
[contacts [:all-new-contacts]]
[view st/participants-container
[new-participants-toolbar]
[list-view {:dataSource (to-datasource contacts)
:renderRow new-participants-row
:style st/participants-list}]])

View File

@ -1,22 +0,0 @@
(ns status-im.participants.views.contact
(:require-macros [status-im.utils.views :refer [defview]])
(:require [re-frame.core :refer [subscribe dispatch dispatch-sync]]
[status-im.components.react :refer [view]]
[status-im.components.contact.contact :refer [contact-inner-view]]
[status-im.components.item-checkbox :refer [item-checkbox]]
[status-im.participants.styles :as st]))
;; todo duplication
(defn on-toggle [whisper-identity]
(fn [checked?]
(let [action (if checked? :select-participant :deselect-participant)]
(dispatch [action whisper-identity]))))
(defview participant-contact
[{:keys [whisper-identity] :as contact}]
[checked [:is-participant-selected? whisper-identity]]
[view st/participant-container
[item-checkbox {:onToggle (on-toggle whisper-identity)
:checked checked
:size 30}]
[contact-inner-view {:contact contact}]])

View File

@ -1,40 +0,0 @@
(ns status-im.participants.views.remove
(:require-macros [status-im.utils.views :refer [defview]])
(:require [re-frame.core :refer [subscribe dispatch]]
[status-im.react-native.resources :as res]
[status-im.components.react :refer [view
text
image
touchable-highlight
list-view
list-item]]
[status-im.components.status-bar :refer [status-bar]]
[status-im.components.toolbar.view :refer [toolbar]]
[status-im.utils.listview :refer [to-datasource]]
[status-im.participants.views.contact
:refer [participant-contact]]
[reagent.core :as r]
[status-im.participants.styles :as st]
[status-im.i18n :refer [label]]))
(defn remove-participants-toolbar []
[view
[status-bar]
[toolbar
{:title (label :t/remove-participants)
:actions [{:handler #(do (dispatch [:remove-participants])
(dispatch [:navigate-back]))
:image {:source res/trash-icon ;; {:uri "icon_search"}
:style st/remove-participants-image}}]}]])
(defn remove-participants-row
[row _ _]
(r/as-element [participant-contact row]))
(defview remove-participants []
[contacts [:current-chat-contacts]]
[view st/participants-container
[remove-participants-toolbar]
[list-view {:dataSource (to-datasource contacts)
:renderRow remove-participants-row
:style st/participants-list}]])

View File

@ -6,7 +6,6 @@
status-im.discover.subs
status-im.contacts.subs
status-im.new-group.subs
status-im.participants.subs
status-im.transactions.subs
status-im.bots.subs))