Skip to content

Commit

Permalink
qa fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarBasem committed Dec 16, 2022
1 parent ced23fe commit babab2f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/quo2/components/avatars/group_avatar.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
:align-items :center
:justify-content :center
:border-radius (/ container-size 2)
;:background-color (colors/custom-color-by-theme color 50 60)
:background-color color}
[icon/icon :i/group {:size icon-size
:color colors/white-opa-70}]])))
4 changes: 1 addition & 3 deletions src/status_im/group_chats/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@
{::json-rpc/call [{:method "wakuext_addMembersToGroupChat"
:params [nil current-chat-id selected-participants]
:js-response true
:on-success #(do
(println "SUCCESSADDMEMBERS" selected-participants)
(re-frame/dispatch [:chat-updated % true]))}]})
:on-success #(re-frame/dispatch [:chat-updated % true])}]})

(fx/defn add-members-from-invitation
"Add members to a group chat"
Expand Down
7 changes: 4 additions & 3 deletions src/status_im/ui2/screens/chat/group_details/style.cljs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(ns status-im.ui2.screens.chat.group-details.style
(:require [quo2.foundations.colors :as colors]))
(:require [quo2.foundations.colors :as colors]
[react-native.platform :as platform]))

(defn actions-view []
{:flex-direction :row
Expand Down Expand Up @@ -29,12 +30,12 @@
:align-items :center
:margin-bottom 24})

(def bottom-container
(defn bottom-container [safe-area]
{:position :absolute
:padding-horizontal 20
:padding-vertical 12
:padding-bottom 33
:width "100%"
:background-color colors/white
:flex-direction :row
:bottom 0})
:bottom (if platform/ios? (:bottom safe-area) 80)})
2 changes: 1 addition & 1 deletion src/status_im/ui2/screens/chat/group_details/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
[contact-list/contact-list {:icon :check
:group group
:search? true}]
[rn/view {:style style/bottom-container}
[rn/view {:style (style/bottom-container safe-area)}
[quo2/button {:style {:flex 1}
:accessibility-label :save
:on-press (fn []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
(fn [c]
{:key c
:value c})
["#ff0000" "#0000ff"])}])
["#ff0000" "#0000ff"])}]) ; TODO: this is temporary only. Issue: https://github.com/status-im/status-mobile/issues/14566

(defn cool-preview []
(let [state (reagent/atom {:theme :light
Expand Down
9 changes: 6 additions & 3 deletions src/status_im2/subs/contact.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
[status-im.ethereum.core :as ethereum]
[clojure.string :as string]
[utils.collection]
[i18n.i18n :as i18n]))
[i18n.i18n :as i18n]
[utils.re-frame :as rf]))

(re-frame/reg-sub
::query-current-chat-contacts
Expand Down Expand Up @@ -292,8 +293,10 @@
:<- [:contacts/current-chat-contacts]
(fn [members]
(let [admins (filter :admin? members)
online (filter #(and (not (:admin? %)) (:online? %)) members)
offline (filter #(and (not (:admin? %)) (not (:online? %))) members)]
online (filter #(let [online (rf/sub [:visibility-status-updates/online? (:public-key %)])]
(and (not (:admin? %)) online)) members)
offline (filter #(let [online (rf/sub [:visibility-status-updates/online? (:public-key %)])]
(and (not (:admin? %)) (not online))) members)]
(vals (cond-> {}
(seq admins) (assoc :owner {:title (i18n/label :t/owner) :data admins})
(seq online) (assoc :online {:title (i18n/label :t/online) :data online})
Expand Down
3 changes: 2 additions & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1894,5 +1894,6 @@
"unmute-group": "Unmute group",
"remove-user-from-group": "Remove {{username}} from the group",
"edit-name-image": "Edit name and image",
"owner": "Owner"
"owner": "Owner",
"online": "Online"
}

0 comments on commit babab2f

Please sign in to comment.