Compare commits

..
Author SHA1 Message Date
Vitaliy Vlasov ca569a7bd8 Fix for empty display-name 2023-02-17 17:29:32 +02:00
andrey de7cfe9242 remove red borders from messages 2023-02-17 13:02:21 +01:00
Andrea Maria Piana 1e224217f7 Fix contact request state 2023-02-17 10:20:23 +00:00
Andrea Maria Piana 9b15705f4a Upgrade status-go to 0.131.7+hotfix.1 2023-02-17 10:13:50 +00:00
Vitaliy Vlasov 5ad6f6a256 Use display-name in profile view
https://github.com/status-im/status-go/compare/97579ee3...97579ee3

Signed-off-by: Vitaliy Vlasov <siphiuel@protonmail.com>
2023-02-17 11:37:23 +02:00
Parvesh Monu 70bd57a1d1 fix deep links to user profiles don't do anything on tap
(cherry picked from commit 5cea66647e)
2023-02-15 23:31:25 +05:30
Andrea Maria Piana 9c1cd317ab Upgrade status-go to 0.131.4 2023-02-15 12:16:08 +00:00
andrey 31371ac9e5 [#15056] Can't see display/ens/name when mentioning in community hotfix 2023-02-15 12:38:17 +01:00
Andrea Maria Piana 087a02c8a0 Upgrade status-go to 0.131.2 2023-02-14 14:51:57 +00:00
Parvesh Monu c825fa6634 fix new chat button is not visible in small screen devices
(cherry picked from commit 5e87d7eefd)
2023-02-14 16:59:13 +05:30
jakub b6c55097c3 ci: update ITSEncryptionExportComplianceCode
We were using old ID for the encryption compliance from old Org.
Because of this the iOS release builds failed at TestFlight upload:
```
Error: Asset validation failed Invalid Export Compliance Code.
The export compliance key value [1aa92c4d-6194-4d7d-b70a-16b48256b87e]
in the app's Info.plist doesn’t match the key value of the app’s export
compliance documentation.
To find the correct value, go to My Apps on App Store Connect. (90592)
```
Related:
- https://stackoverflow.com/questions/53326492/
- https://help.apple.com/app-store-connect/#/dev38f592ac9

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-02-14 11:50:01 +01:00
jakub 57a81fbca0 ci: fix Jenkins lib function for reading version
Otherwise we just get `UNKNOWN` in release filenames.

Depends on: https://github.com/status-im/status-jenkins-lib/pull/56

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-02-13 18:47:38 +01:00
Andrea Maria Piana d3f6cbf687 Upgrade status-go to 0.131.1 2023-02-13 16:13:37 +00:00
Alexander 5e84446f9d The [Cancel] and [Join] buttons are hidden within 'Join Community' overlay (#14971)
* The [Cancel] and [Join] buttons are hidden within 'Join Community' overlay

* Lint

* Fixes

* Lint fix
2023-02-10 14:23:24 +00:00
Andrea Maria Piana 3a299e2c7f Bump version to 0.130.3 2023-02-10 14:15:55 +00:00
flexsurfer cbaf5db674 [#15046] Contacts in contact list are sorted by 3-random name (#15051)
(cherry picked from commit b1d4368154)
2023-02-10 10:48:42 +01:00
Andrea Maria Piana 59d122d6e3 Bump status-go to 0.130.1 2023-02-09 15:33:12 +00:00
Omar Basem 4d99227036 fix: image actions (#14996)
* fix: image actions and reactions
2023-02-09 11:01:12 +00:00
25 changed files with 114 additions and 114 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.5'
library 'status-jenkins-lib@v1.6.6'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.3'
library 'status-jenkins-lib@v1.6.6'
pipeline {
agent { label 'linux' }
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.5'
library 'status-jenkins-lib@v1.6.6'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.3'
library 'status-jenkins-lib@v1.6.6'
pipeline {
agent { label params.AGENT_LABEL }
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.3'
library 'status-jenkins-lib@v1.6.6'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.5'
library 'status-jenkins-lib@v1.6.6'
pipeline {
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.3'
library 'status-jenkins-lib@v1.6.6'
pipeline {
agent { label 'macos' }
+1 -1
View File
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.6.3'
library 'status-jenkins-lib@v1.6.6'
pipeline {
agent { label 'linux' }
+1 -1
View File
@@ -52,7 +52,7 @@
<key>ITSAppUsesNonExemptEncryption</key>
<true/>
<key>ITSEncryptionExportComplianceCode</key>
<string>1aa92c4d-6194-4d7d-b70a-16b48256b87e</string>
<string>37d5ac79-0eb2-4e66-9117-8a8515185a7f</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>whatsapp</string>
+1 -1
View File
@@ -48,7 +48,7 @@
<key>ITSAppUsesNonExemptEncryption</key>
<true/>
<key>ITSEncryptionExportComplianceCode</key>
<string>1aa92c4d-6194-4d7d-b70a-16b48256b87e</string>
<string>37d5ac79-0eb2-4e66-9117-8a8515185a7f</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>whatsapp</string>
+6 -2
View File
@@ -193,17 +193,21 @@
[alias name nickname]))
(defn add-searchable-phrases-to-contact
[{:keys [alias name added? blocked? identicon public-key nickname ens-verified]} community-chat?]
[{:keys [alias name added? blocked? identicon public-key nickname ens-verified display-name]}
community-chat?]
(when (and alias
(not (string/blank? alias))
(or name
display-name
nickname
added?
community-chat?)
(not blocked?))
(add-searchable-phrases
{:alias alias
:name (or (and ens-verified (utils/safe-replace name ".stateofus.eth" "")) alias)
:name (or (and ens-verified (utils/safe-replace name ".stateofus.eth" ""))
(when-not (string/blank? display-name) display-name)
alias)
:identicon identicon
:nickname nickname
:ens-verified ens-verified
+2 -2
View File
@@ -43,8 +43,8 @@
(defn sort-contacts
[contacts]
(sort (fn [c1 c2]
(let [name1 (or (:name c1) (:address c1) (:public-key c1))
name2 (or (:name c2) (:address c2) (:public-key c2))]
(let [name1 (first (:two-names c1))
name2 (first (:two-names c2))]
(compare (string/lower-case name1)
(string/lower-case name2))))
(vals contacts)))
+15 -16
View File
@@ -40,11 +40,8 @@
:three-words-name (or alias (gfycat/generate-gfy public-key))}
;; Preferred name is our own otherwise we make sure it's verified
(or preferred-name (and ens-verified name))
(assoc :ens-name (str "@" (or (stateofus/username ens-name) ens-name))))))
(assoc :ens-name (or (stateofus/username ens-name) ens-name)))))
;; NOTE: this does a bit of unnecessary work, we could short-circuit the work
;; once the first two are found, i.e don't calculate short key if 2 are already
;; available
(defn contact-two-names
"Returns vector of two names in next order nickname, ens name, display-name, three word name, public key"
[{:keys [names
@@ -56,28 +53,30 @@
display-name
three-words-name]}
(or names (contact-names contact))
short-public-key (when public-key?
(utils/get-shortened-address (or compressed-key
public-key)))]
(->> [nickname ens-name display-name three-words-name short-public-key]
(remove string/blank?)
(take 2))))
non-empty-names (remove string/blank? [nickname ens-name display-name three-words-name])]
(if (> (count non-empty-names) 1)
(vec (take 2 non-empty-names))
[(first non-empty-names)
(when public-key? (utils/get-shortened-address (or compressed-key public-key)))])))
(defn contact-with-names
"Returns contact with :names map "
[contact]
(assoc contact :names (contact-names contact)))
(let [contact' (assoc contact :names (contact-names contact))]
(assoc contact' :two-names (contact-two-names contact' true))))
(defn displayed-name
"Use preferred name, name or alias in that order"
[{:keys [name preferred-name alias public-key ens-verified]}]
(let [ens-name (or preferred-name
"Use preferred name, display-name, name or alias in that order"
[{:keys [name display-name preferred-name alias public-key ens-verified]}]
(let [display-name (if (string/blank? display-name) nil display-name)
ens-name (or preferred-name
display-name
name)]
;; Preferred name is our own otherwise we make sure it's verified
(if (or preferred-name (and ens-verified name))
(let [username (stateofus/username ens-name)]
(str "@" (or username ens-name)))
(or alias (gfycat/generate-gfy public-key)))))
(or username ens-name))
(or display-name alias (gfycat/generate-gfy public-key)))))
(defn contact-by-identity
[contacts identity]
+2 -2
View File
@@ -29,11 +29,11 @@
(testing "names is nil"
(testing "nickname has precedence"
(is
(= [nickname formatted-ens]
(= [nickname ens-name]
(ma/contact-two-names contact public-key))))
(testing "ens name is second option"
(is
(= [formatted-ens display-name]
(= [ens-name display-name]
(ma/contact-two-names
(dissoc contact :nickname)
public-key))))
+18 -4
View File
@@ -8,6 +8,8 @@
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.eip681 :as eip681]
[status-im.ethereum.ens :as ens]
[status-im.utils.types :as types]
[status-im.native-module.core :as status]
[status-im.ethereum.stateofus :as stateofus]
[status-im2.utils.validators :as validators]
[status-im.utils.http :as http]
@@ -71,15 +73,27 @@
(defn match-contact-async
[chain {:keys [user-id ens-name]} callback]
(let [valid-key (and (validators/valid-public-key? user-id)
(not= user-id ens/default-key))]
(let [valid-public-key? (and (validators/valid-public-key? user-id)
(not= user-id ens/default-key))
valid-compressed-key? (validators/valid-compressed-key? user-id)]
(cond
valid-key
valid-public-key?
(callback {:type :contact
:public-key user-id
:ens-name ens-name})
(and (not valid-key)
valid-compressed-key?
(status/compressed-key->public-key
user-id
(fn [response]
(let [{:keys [error]} (types/json->clj response)]
(when-not error
(match-contact-async
chain
{:user-id (str "0x" (subs response 5)) :ens-name ens-name}
callback)))))
(and (not valid-public-key?)
(string? user-id)
(not (string/blank? user-id))
(not= user-id "0x"))
@@ -16,6 +16,7 @@
:justify-content :center
:align-items :center})
(defn chat-button
[{:keys [bottom]}]
{:bottom (- bottom 50)})
(def chat-button
{:position :absolute
:bottom 30
:align-self :center})
@@ -6,14 +6,12 @@
[reagent.core :as reagent]
[status-im2.constants :as constants]
[utils.i18n :as i18n]
[status-im.ui.components.react :as react]
[react-native.core :as rn]
[utils.re-frame :as rf]
[status-im.ui.components.toolbar :as toolbar]
[status-im2.common.contact-list.view :as contact-list]
[quo2.components.markdown.text :as text]
[status-im.ui.components.invite.events :as invite.events]
[status-im.ui2.screens.chat.components.new-chat.styles :as style]
[quo.components.safe-area :as safe-area]
[status-im.react-native.resources :as resources]))
(defn- hide-sheet-and-dispatch
@@ -33,11 +31,11 @@
(defn- no-contacts-view
[]
[react/view
[rn/view
{:style {:justify-content :center
:align-items :center
:margin-top 120}}
[react/image
[rn/image
{:source (resources/get-image (if (quo2.colors/dark?) :no-contacts-dark :no-contacts))}]
[text/text
{:weight :semi-bold
@@ -74,9 +72,8 @@
added? (reagent/atom '())
{:keys [nickname ens-name three-words-name]} names
first-username (or ens-name nickname three-words-name)
no-contacts? (empty? contacts)
safe-area (safe-area/use-safe-area)]
[react/view {:style {:height (* window-height 0.9)}}
no-contacts? (empty? contacts)]
[rn/view {:style {:height (* window-height 0.9)}}
[quo2/button
{:type :grey
:icon true
@@ -85,7 +82,7 @@
:override-background-color (quo2.colors/theme-colors quo2.colors/neutral-10
quo2.colors/neutral-90)}
:i/close]
[react/view style/contact-selection-heading
[rn/view style/contact-selection-heading
[quo2/text
{:weight :semi-bold
:size :heading-1
@@ -99,9 +96,8 @@
(i18n/label :t/selected-count-from-max
{:selected (inc selected-contacts-count)
:max constants/max-group-chat-participants})])]
[react/view
{:style {:height 430
:margin-bottom -20}}
[rn/view
{:style {:flex 1}}
(if no-contacts?
[no-contacts-view]
[contact-list/contact-list
@@ -110,21 +106,19 @@
:added? added?
:search? false
:start-a-new-chat? true
:on-toggle on-toggle}])]
:on-toggle on-toggle}
70])]
(when contacts-selected?
[toolbar/toolbar
{:size :default
:show-border? false
:center [button/button
{:type :primary
:accessibility-label :next-button
:style (style/chat-button safe-area)
:on-press (fn []
(if one-contact-selected?
(hide-sheet-and-dispatch [:chat.ui/start-chat
public-key])
(hide-sheet-and-dispatch [:navigate-to
:new-group])))}
(if one-contact-selected?
(i18n/label :t/chat-with {:selected-user first-username})
(i18n/label :t/setup-group-chat))]}])]))])
[button/button
{:type :primary
:style style/chat-button
:accessibility-label :next-button
:on-press (fn []
(if one-contact-selected?
(hide-sheet-and-dispatch [:chat.ui/start-chat
public-key])
(hide-sheet-and-dispatch [:navigate-to
:new-group])))}
(if one-contact-selected?
(i18n/label :t/chat-with {:selected-user first-username})
(i18n/label :t/setup-group-chat))])]))])
@@ -40,7 +40,7 @@
(rf/sub [:contacts/contact-name-by-identity from]))
(defn render-inline
[_message-text content-type acc {:keys [type literal destination]} use-status-tag?]
[_message-text content-type acc {:keys [type literal destination]}]
(case type
""
(conj acc literal)
@@ -82,10 +82,9 @@
"status-tag"
(conj acc
[rn/text
(when use-status-tag?
{:style {:color :blue
:text-decoration-line :underline}
:on-press #(rf/dispatch [:chat.ui/start-public-chat literal])})
{:style {:color :blue
:text-decoration-line :underline}
:on-press #(rf/dispatch [:chat.ui/start-public-chat literal])}
"#"
literal])
@@ -97,15 +96,13 @@
;; TEXT
(defn render-block
[{:keys [content content-type edited-at in-popover?]} acc
{:keys [type ^js literal children]}
use-status-tag?]
{:keys [type ^js literal children]}]
(case type
"paragraph"
(conj acc
(reduce
(fn [acc e] (render-inline (:text content) content-type acc e use-status-tag?))
(fn [acc e] (render-inline (:text content) content-type acc e))
[rn/text (style/text-style content-type in-popover?)]
(conj
children
@@ -126,13 +123,11 @@
acc))
(defn render-parsed-text
[{:keys [content chat-id] :as message-data}]
(let [{:keys [chat-type]} (rf/sub [:chats/chat chat-id])
use-status-tag? (= constants/community-chat-type chat-type)]
(reduce (fn [acc e]
(render-block message-data acc e use-status-tag?))
[:<>]
(:parsed-text content))))
[{:keys [content] :as message-data}]
(reduce (fn [acc e]
(render-block message-data acc e))
[:<>]
(:parsed-text content)))
(defn quoted-message
[{:keys [message-id chat-id]} reply pin?]
@@ -293,7 +288,7 @@
[rn/view style/status-container
[rn/text {:style (style/status-text)}
(reduce
(fn [acc e] (render-inline (:text content) content-type acc e false))
(fn [acc e] (render-inline (:text content) content-type acc e))
[rn/text {:style (style/status-text)}]
(-> content :parsed-text peek :children))]])
@@ -113,11 +113,7 @@
:pop-to-root-tab-fx :profile-stack}
public-key
(navigation/navigate-to-cofx (-> cofx
(assoc-in [:db :contacts/identity] public-key)
(assoc-in [:db :contacts/ens-name] ens-name))
:profile
{})))
{:dispatch [:chat.ui/show-profile public-key ens-name]}))
(rf/defn handle-eip681
[cofx data]
+2 -2
View File
@@ -9,7 +9,7 @@
[quo/divider-label {:label title}])
(defn contact-list
[data]
[data padding-bottom]
(let [contacts (if (:group data)
(rf/sub [:contacts/grouped-by-first-letter])
(rf/sub [:contacts/filtered-active-sections]))]
@@ -18,6 +18,6 @@
:sticky-section-headers-enabled false
:sections contacts
:render-section-header-fn contacts-section-header
:content-container-style {:padding-bottom 20}
:content-container-style {:padding-bottom (or padding-bottom 20)}
:render-data data
:render-fn contact-list-item/contact-list-item}]))
@@ -41,7 +41,7 @@
{:type :negative :label (i18n/label :t/declined)}
nil)}
(case (:contact-request-state message)
constants/contact-request-state-mutual
constants/contact-request-message-state-pending
{:button-1 {:label (i18n/label :t/decline)
:accessibility-label :decline-contact-request
:type :danger
@@ -134,16 +134,16 @@
(case content-type
constants/content-type-text
[not-implemented/not-implemented [content.text/text-content message-data context]]
[content.text/text-content message-data context]
constants/content-type-emoji
[not-implemented/not-implemented [old-message/emoji message-data]]
[old-message/emoji message-data]
constants/content-type-sticker
[not-implemented/not-implemented [old-message/sticker message-data]]
[old-message/sticker message-data]
constants/content-type-audio
[not-implemented/not-implemented [old-message/audio message-data]]
[old-message/audio message-data]
constants/content-type-image
[image/image-message 0 message-data context on-long-press]
@@ -151,7 +151,7 @@
constants/content-type-album
[album/album-message message-data context on-long-press]
[not-implemented/not-implemented [content.unknown/unknown-content message-data]])
[content.unknown/unknown-content message-data])
(when @show-delivery-state?
[status/status outgoing-status])]]]])))])
+4 -10
View File
@@ -76,16 +76,10 @@
:contacts/active-sections
:<- [:contacts/active]
(fn [contacts]
(-> (reduce
(fn [acc contact]
(let [first-char (first (:alias contact))]
(if (get acc first-char)
(update-in acc [first-char :data] #(conj % contact))
(assoc acc first-char {:title first-char :data [contact]}))))
{}
contacts)
sort
vals)))
(->> contacts
(group-by #(string/upper-case (ffirst (:two-names %))))
sort
(mapv (fn [[title items]] {:title title :data items})))))
(re-frame/reg-sub
:contacts/grouped-by-first-letter
+6 -3
View File
@@ -95,7 +95,8 @@
:names {:nickname nil
:display-name ""
:three-words-name "Fake Slim Shady"
:ens-name "@slim.shady"}
:ens-name "slim.shady"}
:two-names ["slim.shady" "Fake Slim Shady"]
:has-added-us true
:contact-request-state 1}]}
{:title "I"
@@ -124,7 +125,8 @@
:names {:nickname nil
:display-name ""
:three-words-name "Instant noodles"
:ens-name "@slim.shady"}
:ens-name "slim.shady"}
:two-names ["slim.shady" "Instant noodles"]
:has-added-us true
:contact-request-state 1}]}
{:title "R"
@@ -153,7 +155,8 @@
:names {:nickname nil
:display-name ""
:three-words-name "Real Slim Shady"
:ens-name "@slim.shady"}
:ens-name "slim.shady"}
:two-names ["slim.shady" "Real Slim Shady"]
:has-added-us true
:contact-request-state 1}]}])
+3 -3
View File
@@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.130.0",
"commit-sha1": "dea21f440a9f630c4b8324fcde0b016d6c3fc02b",
"src-sha256": "1w9iyigj0rkqfnyb8m9w802r1lx1cydg41p8qb7hnsry2bgrfk97"
"version": "v0.131.7+hotfix.1",
"commit-sha1": "47263752fca6d2efab08430aa71d33296374b805",
"src-sha256": "1fsv1nlqw0rln01alzr5bqlh9mkh2jjwxg1binfiwq34fk91r4sq"
}