From 23af62430500d2e488ef9bf88bb7cfb2f87a402d Mon Sep 17 00:00:00 2001 From: yenda Date: Wed, 25 Mar 2020 01:30:29 +0100 Subject: [PATCH] fix #10052 make finding the public key easier in profile Signed-off-by: yenda --- .../app/src/main/res/drawable-hdpi/share.png | Bin 202 -> 0 bytes .../app/src/main/res/drawable-mdpi/share.png | Bin 163 -> 319 bytes .../app/src/main/res/drawable-xhdpi/share.png | Bin 249 -> 512 bytes .../src/main/res/drawable-xxhdpi/share.png | Bin 363 -> 886 bytes .../src/main/res/drawable-xxxhdpi/share.png | Bin 439 -> 0 bytes .../ui/screens/profile/components/views.cljs | 107 ++++++++++-------- .../ui/screens/profile/contact/views.cljs | 37 +++--- .../ui/screens/profile/user/views.cljs | 38 +++---- 8 files changed, 99 insertions(+), 83 deletions(-) delete mode 100644 android/app/src/main/res/drawable-hdpi/share.png delete mode 100644 android/app/src/main/res/drawable-xxxhdpi/share.png diff --git a/android/app/src/main/res/drawable-hdpi/share.png b/android/app/src/main/res/drawable-hdpi/share.png deleted file mode 100644 index f70ab8f28b62d651d2c56904d344e1165692b4cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8LpL{AsTkcwMxuk>;@C>tyx!5^6esQ+2Nm$}8cE(nsshRm};;fYiOacvqedqSXJk!eB zf8s$#>3PL_>kd07E;nM#Ie}oVXH` z-DlW!Wly=AZ8+M~dQmR-z&`u?{EV;9oG{Px#1ZP1_ zK>z@;j|==^1poj5)Ja4^RCodHl;H`)APj{cH^GhIC>^02)D3zY)KPAej$k+NHs}a< zN+U{8LF@e}^n-^)G{z(ZxcM`)m9hF-X{!kxk>r@`g-&R4sDH>-WE*tCM_k-{pq{~M zjqHW3Tj}x>M{bqX$o5@9brj`}bPckF76={TWhkMf{J>di*<8)^G@k33cVx%8P9G&8k?4ewno*oqvA)VJ86`l{R q3tKmI!sWVZR2{S+Q86lRlKcR??QaP^x5P{U00001;o}3+`o|%U2Q7K2 ziYXa<8_-V;FUS$~aD4>BDZt<8 diff --git a/android/app/src/main/res/drawable-xhdpi/share.png b/android/app/src/main/res/drawable-xhdpi/share.png index 9854f8e085cc2834e9805aea4c63372a8c4ae521..28105d6fdae5da0eb55e2a08fa8a5d0ed29bba23 100644 GIT binary patch delta 497 zcmV_lGAsyRhtXD^MsD3jdkP=zn3PjlM^H7m4rbH77mCPPBfr7MjJ>?E|*`x?Hr zB3oI?3km;HUw?zo?_4O<<1?+t`y1>eq||TCrZq%?PnTkJeEAOT81IF^d9kaG7_yfq z!b?3}5s8H7mp!H4s>dAPNuh=vD)m?MCyx>@a_v*%^P#{O6IZEUN+Yo&*2pu` z=;Vk%0veoG$gCqB+(!>h-nTYBh>%h*;D3}5<1-Qwx@r;vVWoZ=uW@YEmXb(-z_2=7 zj`%2fSE9kTBMLX@N;DX11vRd8C2ma$2VUel>#hWc0>2Nk>Pol>J*ph)N?b()e+RPt nMsR6YA{GJ{bR`OfLLnYMoNBWn!GL0x00000NkvXXu0mjf_%F;z delta 232 zcmVf?z!jF2vk|xd=)%XE(TD6uZPvU=2sRhk$s2NY%^Q1<+{!kII iR>2ocmDj@K`A~MPg?(4~+jm9)0000-w8Gi-<0033(vqt~`010qNS#tmYAvgd4Avgg=mN8%e0004VQb$4n zuFf3k00004XF*Lt006O%3;baP0009ENklk3f_MbG3&fcqu5h9*N^I~Y%MmGjcQ_}E!GAL#5F`;85ClOG1VIpl zLeY(^8`(B;Xyj;Lw|4v%GetF0qjiW+9_{;Q!xC@N5-JC)S3G3oaex%tl83ue} zp6xD1j=4wLJ&W{|oks=ClhrLh)iJ5^h(JSv1AA%|AT&@mlc0`%2UYFsYAOd4*lc&aY zozyu>BMf@qr#4UxEq8PU_+5g24L(mPOsIj1jDK7s&bT#BbCN-tqe!RkDEfJl4OA4a zz9LnPuld1{soR0d&= zntcP6fqOfzJo*)*Ck<2<1wQh;NCTAzX`u3ulY{omxPhBxBOB#|+Y)^NNvrgrX;8Ox6P=Y1cfp+3{ zARS-@N+oUycHnkkIzV5XktFC|bIA=l=j4eQem+7V;Q|c9FieJQ;o#8Dg>%65-VXEP z%!1@|ij!haQPMc480k5u2yZX(>Ij41V9n=%2Y8TY0PkxbsbiqP17;Eos)3zSR t^xk=7jSeRjqeqW3_E>^p7=~fKJ~ufFQeLMjow5J`002ovPDHLkV1l?uoTmT) diff --git a/android/app/src/main/res/drawable-xxxhdpi/share.png b/android/app/src/main/res/drawable-xxxhdpi/share.png deleted file mode 100644 index 9e05ff9b400910fb24b1f50e2bc074520d270ebf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 439 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD3?#3*wSy##1AIbUfi$ULF{|52pdNveAirRS z_XZ04*WVW?XxQKoFn>Y5z@mr;3=E9Qo-U3d6}R5bIGERBz{8rHqwpp#`v3py+k~3R zqplwO>J_`!($yjDh-%jz4#g+;7pmE1&#f2w@3_p%p3AgOBvU;+!)UgD7C^_)JouM__ zYC+L2K@09hy1nQ0wp9xp_`IKm@c;w!d+`H*i**`mA1-!0&U8cE_P?$G$9v`p9tr|C z#3%IZOKxZ^=l3W*P$0gF contact - (and ens-verified name) - (assoc :usernames [name]))) + (let [ens-name (when (and ens-verified name) name) + contact (cond-> contact + ens-name + (assoc :usernames [ens-name] + :ens-name ens-name)) + header-in-toolbar (header-in-toolbar contact) + header (header contact) content [[react/view {:padding-top 12} (for [{:keys [label subtext accessibility-label icon action disabled?]} (actions contact)] @@ -132,14 +143,12 @@ :disabled? disabled? :on-press action}])] [react/view styles/contact-profile-details-container - [profile-details (cond-> contact - (and ens-verified name) - (assoc :ens-name name))]] + [profile-details contact]] [block-contact-action contact]] generated-view (large-toolbar/generate-view header-in-toolbar toolbar/default-nav-back - nil + (toolbar-action-items public-key ens-name) header content list-ref)] diff --git a/src/status_im/ui/screens/profile/user/views.cljs b/src/status_im/ui/screens/profile/user/views.cljs index 5b027695176..11af4aff2db 100644 --- a/src/status_im/ui/screens/profile/user/views.cljs +++ b/src/status_im/ui/screens/profile/user/views.cljs @@ -61,37 +61,37 @@ ;:icon :main-icons/link :accessibility-label :share-my-contact-code-button}]]]))) -(defn- header [{:keys [photo-path] :as account} photo-added?] +(defn- header [{:keys [photo-path public-key ens-name] :as account} photo-added?] [profile.components/profile-header {:contact account ;;set to true if we want to re-enable custom icon :allow-icon-change? false :include-remove-action? photo-added?}]) -(defn- header-in-toolbar [account] +(defn- header-in-toolbar [{:keys [public-key preferred-name] :as account}] (let [displayed-name (multiaccounts/displayed-name account)] - [react/view {:flex 1 - :flex-direction :row - :align-items :center - :align-self :stretch} - ;;TODO this should be done in a subscription - [photos/photo (multiaccounts/displayed-photo account) {:size 40}] - [react/text {:style {:typography :title-bold - :line-height 21 - :margin-right 40 - :margin-left 16 - :text-align :left}} - displayed-name]])) + [react/touchable-opacity + {:on-press #(profile.components/chat-key-popover public-key preferred-name) + :style {:flex 1}} + [react/view {:style {:flex 1 + :flex-direction :row + :align-items :center + :align-self :stretch}} + ;;TODO this should be done in a subscription + [photos/photo (multiaccounts/displayed-photo account) {:size 40}] + [react/text {:style {:typography :title-bold + :line-height 21 + :margin-right 40 + :margin-left 16 + :text-align :left}} + displayed-name]]])) -(defn- toolbar-action-items [public-key ens-name] +(defn- toolbar-action-items [public-key preferred-name] [toolbar/actions [{:icon :main-icons/share :icon-opts {:width 24 :height 24} - :handler #(re-frame/dispatch [:show-popover - {:view :share-chat-key - :address public-key - :ens-name ens-name}])}]]) + :handler #(profile.components/chat-key-popover public-key preferred-name)}]]) (defn tribute-to-talk-item [opts]