diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 1cb7f8d7bc..26faee3ca6 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -4,14 +4,14 @@ PODS: - React - CryptoSwift (1.5.1) - DoubleConversion (1.1.6) - - FBLazyVector (0.63.4) - - FBReactNativeSpec (0.63.4): + - FBLazyVector (0.63.5) + - FBReactNativeSpec (0.63.5): - Folly (= 2020.01.13.00) - - RCTRequired (= 0.63.4) - - RCTTypeSafety (= 0.63.4) - - React-Core (= 0.63.4) - - React-jsi (= 0.63.4) - - ReactCommon/turbomodule/core (= 0.63.4) + - RCTRequired (= 0.63.5) + - RCTTypeSafety (= 0.63.5) + - React-Core (= 0.63.5) + - React-jsi (= 0.63.5) + - ReactCommon/turbomodule/core (= 0.63.5) - Folly (2020.01.13.00): - boost-for-react-native - DoubleConversion @@ -40,172 +40,172 @@ PODS: - RNPermissions - Permission-Microphone (2.1.5): - RNPermissions - - RCTRequired (0.63.4) - - RCTTypeSafety (0.63.4): - - FBLazyVector (= 0.63.4) + - RCTRequired (0.63.5) + - RCTTypeSafety (0.63.5): + - FBLazyVector (= 0.63.5) - Folly (= 2020.01.13.00) - - RCTRequired (= 0.63.4) - - React-Core (= 0.63.4) - - React (0.63.4): - - React-Core (= 0.63.4) - - React-Core/DevSupport (= 0.63.4) - - React-Core/RCTWebSocket (= 0.63.4) - - React-RCTActionSheet (= 0.63.4) - - React-RCTAnimation (= 0.63.4) - - React-RCTBlob (= 0.63.4) - - React-RCTImage (= 0.63.4) - - React-RCTLinking (= 0.63.4) - - React-RCTNetwork (= 0.63.4) - - React-RCTSettings (= 0.63.4) - - React-RCTText (= 0.63.4) - - React-RCTVibration (= 0.63.4) - - React-callinvoker (0.63.4) - - React-Core (0.63.4): + - RCTRequired (= 0.63.5) + - React-Core (= 0.63.5) + - React (0.63.5): + - React-Core (= 0.63.5) + - React-Core/DevSupport (= 0.63.5) + - React-Core/RCTWebSocket (= 0.63.5) + - React-RCTActionSheet (= 0.63.5) + - React-RCTAnimation (= 0.63.5) + - React-RCTBlob (= 0.63.5) + - React-RCTImage (= 0.63.5) + - React-RCTLinking (= 0.63.5) + - React-RCTNetwork (= 0.63.5) + - React-RCTSettings (= 0.63.5) + - React-RCTText (= 0.63.5) + - React-RCTVibration (= 0.63.5) + - React-callinvoker (0.63.5) + - React-Core (0.63.5): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.4) - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-Core/Default (= 0.63.5) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/CoreModulesHeaders (0.63.4): + - React-Core/CoreModulesHeaders (0.63.5): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/Default (0.63.4): + - React-Core/Default (0.63.5): - Folly (= 2020.01.13.00) - glog - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/DevSupport (0.63.4): + - React-Core/DevSupport (0.63.5): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.4) - - React-Core/RCTWebSocket (= 0.63.4) - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) - - React-jsinspector (= 0.63.4) + - React-Core/Default (= 0.63.5) + - React-Core/RCTWebSocket (= 0.63.5) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) + - React-jsinspector (= 0.63.5) - Yoga - - React-Core/RCTActionSheetHeaders (0.63.4): + - React-Core/RCTActionSheetHeaders (0.63.5): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/RCTAnimationHeaders (0.63.4): + - React-Core/RCTAnimationHeaders (0.63.5): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/RCTBlobHeaders (0.63.4): + - React-Core/RCTBlobHeaders (0.63.5): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/RCTImageHeaders (0.63.4): + - React-Core/RCTImageHeaders (0.63.5): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/RCTLinkingHeaders (0.63.4): + - React-Core/RCTLinkingHeaders (0.63.5): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/RCTNetworkHeaders (0.63.4): + - React-Core/RCTNetworkHeaders (0.63.5): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/RCTSettingsHeaders (0.63.4): + - React-Core/RCTSettingsHeaders (0.63.5): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/RCTTextHeaders (0.63.4): + - React-Core/RCTTextHeaders (0.63.5): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/RCTVibrationHeaders (0.63.4): + - React-Core/RCTVibrationHeaders (0.63.5): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-Core/RCTWebSocket (0.63.4): + - React-Core/RCTWebSocket (0.63.5): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.4) - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsiexecutor (= 0.63.4) + - React-Core/Default (= 0.63.5) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsiexecutor (= 0.63.5) - Yoga - - React-CoreModules (0.63.4): - - FBReactNativeSpec (= 0.63.4) + - React-CoreModules (0.63.5): + - FBReactNativeSpec (= 0.63.5) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.4) - - React-Core/CoreModulesHeaders (= 0.63.4) - - React-jsi (= 0.63.4) - - React-RCTImage (= 0.63.4) - - ReactCommon/turbomodule/core (= 0.63.4) - - React-cxxreact (0.63.4): + - RCTTypeSafety (= 0.63.5) + - React-Core/CoreModulesHeaders (= 0.63.5) + - React-jsi (= 0.63.5) + - React-RCTImage (= 0.63.5) + - ReactCommon/turbomodule/core (= 0.63.5) + - React-cxxreact (0.63.5): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-callinvoker (= 0.63.4) - - React-jsinspector (= 0.63.4) - - React-jsi (0.63.4): + - React-callinvoker (= 0.63.5) + - React-jsinspector (= 0.63.5) + - React-jsi (0.63.5): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-jsi/Default (= 0.63.4) - - React-jsi/Default (0.63.4): + - React-jsi/Default (= 0.63.5) + - React-jsi/Default (0.63.5): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-jsiexecutor (0.63.4): + - React-jsiexecutor (0.63.5): - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) - - React-jsinspector (0.63.4) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) + - React-jsinspector (0.63.5) - react-native-background-timer (2.2.0): - React - react-native-blob-util (0.13.18): @@ -243,66 +243,66 @@ PODS: - React - react-native-webview (11.16.0): - React-Core - - React-RCTActionSheet (0.63.4): - - React-Core/RCTActionSheetHeaders (= 0.63.4) - - React-RCTAnimation (0.63.4): - - FBReactNativeSpec (= 0.63.4) + - React-RCTActionSheet (0.63.5): + - React-Core/RCTActionSheetHeaders (= 0.63.5) + - React-RCTAnimation (0.63.5): + - FBReactNativeSpec (= 0.63.5) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.4) - - React-Core/RCTAnimationHeaders (= 0.63.4) - - React-jsi (= 0.63.4) - - ReactCommon/turbomodule/core (= 0.63.4) - - React-RCTBlob (0.63.4): - - FBReactNativeSpec (= 0.63.4) + - RCTTypeSafety (= 0.63.5) + - React-Core/RCTAnimationHeaders (= 0.63.5) + - React-jsi (= 0.63.5) + - ReactCommon/turbomodule/core (= 0.63.5) + - React-RCTBlob (0.63.5): + - FBReactNativeSpec (= 0.63.5) - Folly (= 2020.01.13.00) - - React-Core/RCTBlobHeaders (= 0.63.4) - - React-Core/RCTWebSocket (= 0.63.4) - - React-jsi (= 0.63.4) - - React-RCTNetwork (= 0.63.4) - - ReactCommon/turbomodule/core (= 0.63.4) - - React-RCTImage (0.63.4): - - FBReactNativeSpec (= 0.63.4) + - React-Core/RCTBlobHeaders (= 0.63.5) + - React-Core/RCTWebSocket (= 0.63.5) + - React-jsi (= 0.63.5) + - React-RCTNetwork (= 0.63.5) + - ReactCommon/turbomodule/core (= 0.63.5) + - React-RCTImage (0.63.5): + - FBReactNativeSpec (= 0.63.5) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.4) - - React-Core/RCTImageHeaders (= 0.63.4) - - React-jsi (= 0.63.4) - - React-RCTNetwork (= 0.63.4) - - ReactCommon/turbomodule/core (= 0.63.4) - - React-RCTLinking (0.63.4): - - FBReactNativeSpec (= 0.63.4) - - React-Core/RCTLinkingHeaders (= 0.63.4) - - React-jsi (= 0.63.4) - - ReactCommon/turbomodule/core (= 0.63.4) - - React-RCTNetwork (0.63.4): - - FBReactNativeSpec (= 0.63.4) + - RCTTypeSafety (= 0.63.5) + - React-Core/RCTImageHeaders (= 0.63.5) + - React-jsi (= 0.63.5) + - React-RCTNetwork (= 0.63.5) + - ReactCommon/turbomodule/core (= 0.63.5) + - React-RCTLinking (0.63.5): + - FBReactNativeSpec (= 0.63.5) + - React-Core/RCTLinkingHeaders (= 0.63.5) + - React-jsi (= 0.63.5) + - ReactCommon/turbomodule/core (= 0.63.5) + - React-RCTNetwork (0.63.5): + - FBReactNativeSpec (= 0.63.5) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.4) - - React-Core/RCTNetworkHeaders (= 0.63.4) - - React-jsi (= 0.63.4) - - ReactCommon/turbomodule/core (= 0.63.4) - - React-RCTSettings (0.63.4): - - FBReactNativeSpec (= 0.63.4) + - RCTTypeSafety (= 0.63.5) + - React-Core/RCTNetworkHeaders (= 0.63.5) + - React-jsi (= 0.63.5) + - ReactCommon/turbomodule/core (= 0.63.5) + - React-RCTSettings (0.63.5): + - FBReactNativeSpec (= 0.63.5) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.4) - - React-Core/RCTSettingsHeaders (= 0.63.4) - - React-jsi (= 0.63.4) - - ReactCommon/turbomodule/core (= 0.63.4) - - React-RCTText (0.63.4): - - React-Core/RCTTextHeaders (= 0.63.4) - - React-RCTVibration (0.63.4): - - FBReactNativeSpec (= 0.63.4) + - RCTTypeSafety (= 0.63.5) + - React-Core/RCTSettingsHeaders (= 0.63.5) + - React-jsi (= 0.63.5) + - ReactCommon/turbomodule/core (= 0.63.5) + - React-RCTText (0.63.5): + - React-Core/RCTTextHeaders (= 0.63.5) + - React-RCTVibration (0.63.5): + - FBReactNativeSpec (= 0.63.5) - Folly (= 2020.01.13.00) - - React-Core/RCTVibrationHeaders (= 0.63.4) - - React-jsi (= 0.63.4) - - ReactCommon/turbomodule/core (= 0.63.4) - - ReactCommon/turbomodule/core (0.63.4): + - React-Core/RCTVibrationHeaders (= 0.63.5) + - React-jsi (= 0.63.5) + - ReactCommon/turbomodule/core (= 0.63.5) + - ReactCommon/turbomodule/core (0.63.5): - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-callinvoker (= 0.63.4) - - React-Core (= 0.63.4) - - React-cxxreact (= 0.63.4) - - React-jsi (= 0.63.4) + - React-callinvoker (= 0.63.5) + - React-Core (= 0.63.5) + - React-cxxreact (= 0.63.5) + - React-jsi (= 0.63.5) - ReactNativeAudioToolkit (2.0.3): - React - ReactNativeNavigation (7.27.1): @@ -637,25 +637,25 @@ SPEC CHECKSUMS: BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872 CryptoSwift: c4f2debceb38bf44c80659afe009f71e23e4a082 DoubleConversion: cde416483dac037923206447da6e1454df403714 - FBLazyVector: 3bb422f41b18121b71783a905c10e58606f7dc3e - FBReactNativeSpec: f2c97f2529dd79c083355182cc158c9f98f4bd6e + FBLazyVector: 352a8ca9bbc8e2f097d680747a8c97ecef12d469 + FBReactNativeSpec: 7dfb84f624136a45727c813ed21d130cd3e61beb Folly: b73c3869541e86821df3c387eb0af5f65addfab4 - glog: 997518ea2aa2d8cd5df9797b641b758d52ecf2bc + glog: 36ce0530c6d2c3a5a4326885ef4069564887a1db HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352 Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8 libwebp: 60305b2e989864154bd9be3d772730f08fc6a59c Permission-Camera: afad27bf90337684d4a86f3825112d648c8c4d3b Permission-Microphone: 0ffabc3fe1c75cfb260525ee3f529383c9f4368c - RCTRequired: 082f10cd3f905d6c124597fd1c14f6f2655ff65e - RCTTypeSafety: 8c9c544ecbf20337d069e4ae7fd9a377aadf504b - React: b0a957a2c44da4113b0c4c9853d8387f8e64e615 - React-callinvoker: c3f44dd3cb195b6aa46621fff95ded79d59043fe - React-Core: d3b2a1ac9a2c13c3bcde712d9281fc1c8a5b315b - React-CoreModules: 0581ff36cb797da0943d424f69e7098e43e9be60 - React-cxxreact: c1480d4fda5720086c90df537ee7d285d4c57ac3 - React-jsi: a0418934cf48f25b485631deb27c64dc40fb4c31 - React-jsiexecutor: 93bd528844ad21dc07aab1c67cb10abae6df6949 - React-jsinspector: 58aef7155bc9a9683f5b60b35eccea8722a4f53a + RCTRequired: 5520387431beaa5f32aa8726bf746cd5353119fe + RCTTypeSafety: bc90d6e287fa427c50ed770922bac30faf0bbfa3 + React: 83a7f231f462b09260a53c5c51005e7659c66890 + React-callinvoker: 1c3fdb5562c792212e149637b8a167516bb4b58e + React-Core: 8baca8644a516e772c77e3923697cfe2b58c1606 + React-CoreModules: 200c931e17b332024c2e9d878f67b87c00c2c83b + React-cxxreact: 9096ebaeebf6a1475a14448fa8bfc380c13d7882 + React-jsi: 7d908b17758178b076a05a254523f1a4227b53d2 + React-jsiexecutor: e06a32e42affb2bd89e4c8369349b5fcf787710c + React-jsinspector: fdbc08866b34ae8e1b788ea1cbd9f9d1ca2aa3d6 react-native-background-timer: 1f7d560647b40e6a60b01c452ba29c54bf581fc4 react-native-blob-util: 600972b1782380a5a7d5db61a3817ea32349dae9 react-native-blur: 4568dd93d1d82748c180df8beb2d929c97b13b47 @@ -673,16 +673,16 @@ SPEC CHECKSUMS: react-native-status: 21f75d492fd311dc111303da38a7a2b23a8a8466 react-native-status-keycard: f60ca57d789aad6875c64ece81ab06ef0609e0d3 react-native-webview: 28a8636d97ee641f2ee8f20492d7a6c269c1d703 - React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336 - React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b - React-RCTBlob: a97d378b527740cc667e03ebfa183a75231ab0f0 - React-RCTImage: c1b1f2d3f43a4a528c8946d6092384b5c880d2f0 - React-RCTLinking: 35ae4ab9dc0410d1fcbdce4d7623194a27214fb2 - React-RCTNetwork: 29ec2696f8d8cfff7331fac83d3e893c95ef43ae - React-RCTSettings: 60f0691bba2074ef394f95d4c2265ec284e0a46a - React-RCTText: 5c51df3f08cb9dedc6e790161195d12bac06101c - React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d - ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b + React-RCTActionSheet: e911b99f0d6fa7711ffc2f62d236b12a32771835 + React-RCTAnimation: ad8b853170a059faf31d6add34f67d22391bbe01 + React-RCTBlob: 134c7270b6672c9c05383b2e0f7f044ba39d7dda + React-RCTImage: c5c74ba8850a193d73aef8efb8fcbb4f9cad7653 + React-RCTLinking: 12468e952704555c8cb4e3de94c7b5a266811326 + React-RCTNetwork: e9cfaeb9f3657ae91f895e798734141db6e1af5b + React-RCTSettings: 9a09419bd5e8494f6e146e2c9f5c8e2c6e90ed58 + React-RCTText: 393f059d7ec02c733da57240694201e734f0dc84 + React-RCTVibration: 3e83f53610d63d3c1fc4db303305e934e73047cc + ReactCommon: b9ff54b6dd22ba4a776eda22d7f83ec27544ca35 ReactNativeAudioToolkit: de9610f323e855ac6574be8c99621f3d57c5df06 ReactNativeNavigation: 94979dd1572a3f093fc85d4599360530a1bed8c8 RNCAsyncStorage: b2489b49e38c85e10ed45a888d13a2a4c7b32ea1 @@ -708,7 +708,7 @@ SPEC CHECKSUMS: SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863 TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4 - Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6 + Yoga: 0276e9f20976c8568e107cfc1163a8629051adc0 PODFILE CHECKSUM: a1de9468266e7f0b5273acea713782ab759690f1 diff --git a/src/quo2/components/avatars/group_avatar.cljs b/src/quo2/components/avatars/group_avatar.cljs index 65120a5229..15fe1d79a7 100644 --- a/src/quo2/components/avatars/group_avatar.cljs +++ b/src/quo2/components/avatars/group_avatar.cljs @@ -4,25 +4,29 @@ [react-native.core :as rn])) (def sizes - {:icon {:small 12 - :medium 16 - :large 20} - :container {:small 20 + {:icon {:small 12 + :medium 16 + :large 20} + :container {:small 20 :medium 32 - :large 48}}) + :large 48}}) +;; TODO: this implementation does not support group display picture (can only display default group icon). (defn group-avatar [_] - (fn [{:keys [color size override-theme]}] - (let [theme (or override-theme (if (colors/dark?) :dark :light)) - container-size (get-in sizes [:container size]) - icon-size (get-in sizes [:icon size])] + (fn [{:keys [color size]}] + (let [container-size (get-in sizes [:container size]) + icon-size (get-in sizes [:icon size]) + ;; theme (or override-theme (if (colors/dark?) :dark :light)) + ] [rn/view {:width container-size :height container-size :align-items :center :justify-content :center :border-radius (/ container-size 2) - :background-color (if (= theme :light) - (colors/custom-color color 50) - (colors/custom-color color 60))} - [icon/icon :total-members {:size icon-size - :color colors/white-opa-70}]]))) + :background-color color + ;; :background-color (if (= theme :light) TODO: colors/custom-color method here is not working for some reason. + ;; (colors/custom-color color 50) + ;; (colors/custom-color color 60)) + } + [icon/icon :i/group {:size icon-size ; TODO: group icon sizes 12 and 20 (small and large) are missing + :color colors/white-opa-70}]]))) diff --git a/src/status_im/i18n/i18n_test.cljs b/src/status_im/i18n/i18n_test.cljs index e967376e5b..41034ff711 100644 --- a/src/status_im/i18n/i18n_test.cljs +++ b/src/status_im/i18n/i18n_test.cljs @@ -110,7 +110,7 @@ :blank-keycard-title :block :block-contact - :block-contact-details + :block-user-confirmation :blocked-users :bootnode-address :bootnode-details diff --git a/src/status_im/navigation/core.cljs b/src/status_im/navigation/core.cljs new file mode 100644 index 0000000000..d11343d9e7 --- /dev/null +++ b/src/status_im/navigation/core.cljs @@ -0,0 +1,444 @@ +(ns status-im.navigation.core + (:require + ["react-native" :as rn] + ["react-native-gesture-handler" :refer (gestureHandlerRootHOC)] + ["react-native-navigation" :refer (Navigation)] + [clojure.set :as clojure.set] + [quo.components.text-input :as quo.text-input] + [quo.design-system.colors :as quo.colors] + [re-frame.core :as re-frame] + [status-im.multiaccounts.login.core :as login-core] + [status-im.navigation.roots :as roots] + [status-im.navigation.state :as state] + [status-im.ui.components.icons.icons :as icons] + [status-im.ui.components.react :as react] + [status-im.ui.screens.views :as views] + [status-im.utils.fx :as fx] + [status-im.utils.platform :as platform] + [taoensso.encore :as enc] + [taoensso.timbre :as log])) + +(def debug? ^boolean js/goog.DEBUG) + +(def splash-screen (-> rn .-NativeModules .-SplashScreen)) + +(defonce set-navigation-default-options + (.setDefaultOptions Navigation (clj->js {:layout {:orientation "portrait"}}))) + +;; REGISTER COMPONENT (LAZY) +(defn reg-comp [key] + (log/debug "reg-comp" key) + (if-let [comp (get views/components (keyword key))] + (.registerComponent Navigation key (fn [] (views/component comp))) + (let [screen (views/screen key)] + (.registerComponent Navigation key (fn [] (gestureHandlerRootHOC screen)) (fn [] screen))))) + +(defonce rset-lazy-reg + (.setLazyComponentRegistrator Navigation reg-comp)) + +(defn dismiss-all-modals [] + (log/debug "dissmiss-all-modals") + (when @state/curr-modal + (reset! state/curr-modal false) + (reset! state/dissmissing true) + (doseq [modal @state/modals] + (.dismissModal Navigation (name modal))) + (reset! state/modals []))) + +;; PUSH SCREEN +(defn navigate [comp] + (log/debug "NAVIGATE" comp) + (let [{:keys [options]} (get views/screens comp)] + (.push Navigation + (name @state/root-comp-id) + (clj->js {:component {:id comp + :name comp + :options (merge options + (roots/status-bar-options) + (roots/merge-top-bar (roots/topbar-options) options))}})) + ;;if we push the screen from modal, we want to dismiss all modals + (dismiss-all-modals))) + +;; OPEN MODAL +(defn update-modal-topbar-options [options] + (log/debug "update-modal-topbar-options" options) + (merge options + (roots/merge-top-bar {:elevation 0 + :noBorder true + :title {:color quo.colors/black} + :background {:color quo.colors/white} + :leftButtonColor quo.colors/black + :leftButtons {:id "dismiss-modal" + :icon (icons/icon-source :main-icons/close)}} + options))) + +(defn open-modal [comp] + (log/debug "open-modal" comp) + (let [{:keys [options]} (get views/screens comp)] + (if @state/dissmissing + (reset! state/dissmissing comp) + (do + (reset! state/curr-modal true) + (swap! state/modals conj comp) + (.showModal Navigation + (clj->js {:stack {:children + [{:component + {:name comp + :id comp + :options (update-modal-topbar-options + (merge (roots/status-bar-options) + (roots/default-root) + options))}}]}})))))) + +(re-frame/reg-fx :open-modal-fx open-modal) + +;; DISSMISS MODAL +(defn dissmissModal [] + (log/debug "dissmissModal") + (reset! state/dissmissing true) + (.dismissModal Navigation (name (last @state/modals)))) + +(defonce register-nav-button-reg + (.registerNavigationButtonPressedListener + (.events Navigation) + (fn [^js evn] + (let [id (.-buttonId evn)] + (if (= "dismiss-modal" id) + (do + (when-let [event (get-in views/screens [(last @state/modals) :on-dissmiss])] + (re-frame/dispatch event)) + (dissmissModal)) + (when-let [handler (get-in views/screens [(keyword id) :right-handler])] + (handler))))))) + +(defn set-view-id [view-id] + (log/debug "set-view-id" view-id) + (when-let [{:keys [on-focus]} (get views/screens view-id)] + (re-frame/dispatch [:set-view-id view-id]) + (re-frame/dispatch [:screens/on-will-focus view-id]) + (when on-focus + (re-frame/dispatch on-focus)))) + +(defonce register-modal-reg + (.registerModalDismissedListener + (.events Navigation) + (fn [_] + (if (> (count @state/modals) 1) + (let [new-modals (butlast @state/modals)] + (reset! state/modals (vec new-modals)) + (set-view-id (last new-modals))) + (do + (reset! state/modals []) + (reset! state/curr-modal false) + (set-view-id @state/pushed-screen-id))) + + (let [comp @state/dissmissing] + (reset! state/dissmissing false) + (when (keyword? comp) + (open-modal comp)))))) + +;; SCREEN DID APPEAR +(defonce screen-appear-reg + (.registerComponentDidAppearListener + (.events Navigation) + (fn [^js evn] + (let [view-id (keyword (.-componentName evn))] + (log/debug "screen-appear-reg" view-id) + (when (get views/screens view-id) + (when (and (not= view-id :bottom-sheet) + (not= view-id :popover) + (not= view-id :visibility-status-popover)) + (set-view-id view-id) + (when-not @state/curr-modal + (reset! state/pushed-screen-id view-id)))))))) + +;; SCREEN DID DISAPPEAR +(defonce screen-disappear-reg + (.registerComponentDidDisappearListener + (.events Navigation) + (fn [^js evn] + (let [view-id (keyword (.-componentName evn))] + (when-not (#{"popover" "bottom-sheet" "signing-sheet" "visibility-status-popover" "wallet-connect-sheet" "wallet-connect-success-sheet" "wallet-connect-app-management-sheet"} + (.-componentName evn)) + (re-frame/dispatch [::view-disappeared view-id]) + (doseq [[_ {:keys [ref value]}] @quo.text-input/text-input-refs] + (.setNativeProps ^js ref (clj->js {:text value}))) + (doseq [[^js text-input default-value] @react/text-input-refs] + (.setNativeProps text-input (clj->js {:text default-value})))))))) + +;; SET ROOT +(re-frame/reg-fx + :init-root-fx + (fn [new-root-id] + (log/debug :init-root-fx new-root-id) + (reset! state/root-comp-id new-root-id) + (reset! state/root-id @state/root-comp-id) + (.setRoot Navigation (clj->js (get (roots/roots) new-root-id))))) + +(re-frame/reg-fx + :init-root-with-component-fx + (fn [[new-root-id new-root-comp-id]] + (log/debug :init-root-with-component-fx new-root-id new-root-comp-id) + (reset! state/root-comp-id new-root-comp-id) + (reset! state/root-id @state/root-comp-id) + (.setRoot Navigation (clj->js (get (roots/roots) new-root-id))))) + +(fx/defn set-multiaccount-root + {:events [::set-multiaccount-root]} + [{:keys [db]}] + (log/debug :set-multiaccounts-root) + (let [key-uid (get-in db [:multiaccounts/login :key-uid]) + keycard-account? (boolean (get-in db [:multiaccounts/multiaccounts + key-uid + :keycard-pairing]))] + {:init-root-fx (if keycard-account? :multiaccounts-keycard :multiaccounts)})) + +(defonce rset-app-launched + (.registerAppLaunchedListener (.events Navigation) + (fn [] + (reset! state/curr-modal false) + (reset! state/dissmissing false) + (if (or (= @state/root-id :multiaccounts) + (= @state/root-id :multiaccounts-keycard)) + (re-frame/dispatch-sync [::set-multiaccount-root]) + (when @state/root-id + (reset! state/root-comp-id @state/root-id) + (.setRoot Navigation (clj->js (get (roots/roots) @state/root-id))) + (re-frame/dispatch [::login-core/check-last-chat]))) + (.hide ^js splash-screen)))) + +(defn get-screen-component [comp] + (log/debug :get-screen-component comp) + (let [{:keys [options]} (get views/screens comp)] + {:component {:id comp + :name comp + :options (merge options + (roots/status-bar-options) + (roots/merge-top-bar (roots/topbar-options) options))}})) + +;; SET STACK ROOT +(re-frame/reg-fx + :set-stack-root-fx + (fn [[stack comp]] + (log/debug :set-stack-root-fx stack comp) + (.setStackRoot Navigation + (name stack) + (clj->js (if (vector? comp) + (mapv get-screen-component comp) + (get-screen-component comp)))))) + +;; BOTTOM TABS +(def tab-root-ids {0 :chat-stack + 1 :browser-stack + 2 :wallet-stack + 3 :status-stack + 4 :profile-stack}) + +(def tab-key-idx {:chat 0 + :browser 1 + :wallet 2 + :status 3 + :profile 4}) + +(re-frame/reg-fx + :change-tab-fx + (fn [tab] + (log/debug :change-tab-fx) + (reset! state/root-comp-id (get tab-root-ids (get tab-key-idx tab))) + (.mergeOptions Navigation "tabs-stack" (clj->js {:bottomTabs {:currentTabIndex (get tab-key-idx tab)}})) + ;;when we change tab we want to dismiss all modals + (dismiss-all-modals))) + +;issue on ios https://github.com/wix/react-native-navigation/issues/7146 +(re-frame/reg-fx + :change-tab-count-fx + (fn [[tab cnt]] + (log/debug :change-tab-count-fx tab cnt) + (.mergeOptions Navigation + (name (get tab-root-ids (get tab-key-idx tab))) + (clj->js {:bottomTab (cond + (or (pos? cnt) (pos? (:other cnt))) + (if (and (= :chat tab) platform/ios?) + {:dotIndicator {:visible true}} + {:badge (str (or (:other cnt) cnt)) :dotIndicator {:visible false}}) + (pos? (:public cnt)) + (if platform/ios? + {:dotIndicator {:visible true}} + {:badge nil :dotIndicator {:visible true}}) + :else + (if (and (= :chat tab) platform/ios?) + {:dotIndicator {:visible false}} + {:dotIndicator {:visible false} :badge ""}))})))) + +(re-frame/reg-fx + :pop-to-root-tab-fx + (fn [comp] + (log/debug :pop-to-root-tab-fx comp) + (dismiss-all-modals) + (.popToRoot Navigation (name comp)))) + +(defonce register-bottom-tab-reg + (.registerBottomTabSelectedListener + (.events Navigation) + (fn [^js evn] + (let [selected-tab-index (.-selectedTabIndex evn) + comp (get tab-root-ids selected-tab-index) + tab-key (get (clojure.set/map-invert tab-key-idx) selected-tab-index)] + (re-frame/dispatch [:set :current-tab tab-key]) + (when (= @state/root-comp-id comp) + (when (= :chat tab-key) + (re-frame/dispatch [:close-chat])) + (when platform/android? + (.popToRoot Navigation (name comp)))) + (reset! state/root-comp-id comp))))) + +;; OVERLAY (Popover and bottom sheets) +(defn dissmiss-overlay [comp] + (.catch (.dismissOverlay Navigation comp) #())) + +(defn show-overlay [comp] + (dissmiss-overlay comp) + (.showOverlay Navigation + (clj->js + {:component {:name comp + :id comp + :options (merge (cond-> (roots/status-bar-options) + (and platform/android? (not (quo.colors/dark?))) + (assoc-in [:statusBar :backgroundColor] "#99999A")) + {:layout {:componentBackgroundColor (if platform/android? + (:backdrop @quo.colors/theme) + "transparent")} + :overlay {:interceptTouchOutside true}})}}))) + +;; POPOVER +(defonce popover-reg + (.registerComponent Navigation + "popover" + (fn [] (gestureHandlerRootHOC views/popover-comp)) + (fn [] views/popover-comp))) + +(re-frame/reg-fx :show-popover (fn [] (show-overlay "popover"))) +(re-frame/reg-fx :hide-popover (fn [] (dissmiss-overlay "popover"))) + +;; VISIBILITY STATUS POPOVER +(defonce visibility-status-popover-reg + (.registerComponent Navigation + "visibility-status-popover" + (fn [] (gestureHandlerRootHOC views/visibility-status-popover-comp)) + (fn [] views/visibility-status-popover-comp))) + +(re-frame/reg-fx :show-visibility-status-popover + (fn [] (show-overlay "visibility-status-popover"))) +(re-frame/reg-fx :hide-visibility-status-popover + (fn [] (dissmiss-overlay "visibility-status-popover"))) + +;; BOTTOM SHEETS +(defonce bottom-sheet-reg + (.registerComponent Navigation + "bottom-sheet" + (fn [] (gestureHandlerRootHOC views/sheet-comp)) + (fn [] views/sheet-comp))) + +(re-frame/reg-fx :show-bottom-sheet (fn [] (show-overlay "bottom-sheet"))) +(re-frame/reg-fx :hide-bottom-sheet (fn [] (dissmiss-overlay "bottom-sheet"))) + +;; WALLET CONNECT + +(defonce wallet-connect-sheet-reg + (.registerComponent Navigation + "wallet-connect-sheet" + (fn [] (gestureHandlerRootHOC views/wallet-connect-comp)) + (fn [] views/wallet-connect-comp))) + +(defonce wallet-connect-success-sheet-reg + (.registerComponent Navigation + "wallet-connect-success-sheet" + (fn [] (gestureHandlerRootHOC views/wallet-connect-success-comp)) + (fn [] views/wallet-connect-success-comp))) + +(defonce wallet-connect-app-management-sheet-reg + (.registerComponent Navigation + "wallet-connect-app-management-sheet" + (fn [] (gestureHandlerRootHOC views/wallet-connect-app-management-comp)) + (fn [] views/wallet-connect-app-management-comp))) + +(re-frame/reg-fx :show-wallet-connect-sheet (fn [] (show-overlay "wallet-connect-sheet"))) +(re-frame/reg-fx :hide-wallet-connect-sheet (fn [] (dissmiss-overlay "wallet-connect-sheet"))) +(re-frame/reg-fx :show-wallet-connect-success-sheet (fn [] (show-overlay "wallet-connect-success-sheet"))) +(re-frame/reg-fx :hide-wallet-connect-success-sheet (fn [] (dissmiss-overlay "wallet-connect-success-sheet"))) +(re-frame/reg-fx :show-wallet-connect-app-management-sheet (fn [] (show-overlay "wallet-connect-app-management-sheet"))) +(re-frame/reg-fx :hide-wallet-connect-app-management-sheet (fn [] (dissmiss-overlay "wallet-connect-app-management-sheet"))) + +;; SIGNING + +(defonce signing-sheet-reg + (.registerComponent Navigation + "signing-sheet" + (fn [] (gestureHandlerRootHOC views/signing-comp)) + (fn [] views/signing-comp))) + +(re-frame/reg-fx :show-signing-sheet (fn [] (show-overlay "signing-sheet"))) +(re-frame/reg-fx :hide-signing-sheet (fn [] (dissmiss-overlay "signing-sheet"))) + +;; Select account +;; TODO why is this not a regular bottom sheet ? + +(defonce select-acc-sheet-reg + (.registerComponent Navigation + "select-acc-sheet" + (fn [] (gestureHandlerRootHOC views/select-acc-comp)) + (fn [] views/select-acc-comp))) + +(re-frame/reg-fx :show-select-acc-sheet (fn [] (show-overlay "select-acc-sheet"))) +(re-frame/reg-fx :hide-select-acc-sheet (fn [] (dissmiss-overlay "select-acc-sheet"))) + +;; NAVIGATION + +(re-frame/reg-fx + :navigate-to-fx + (fn [key] + (log/debug :navigate-to-fx key) + (navigate key))) + +(re-frame/reg-fx + :navigate-back-fx + (fn [] + (log/debug :navigate-back-fx) + (if @state/curr-modal + (dissmissModal) + (.pop Navigation (name @state/root-comp-id))))) + +(re-frame/reg-fx + :navigate-replace-fx + (fn [view-id] + (log/debug :navigate-replace-fx view-id) + (.pop Navigation (name @state/root-comp-id)) + (navigate view-id))) + +(def community-screens '(:community-management + :community-members + :community-requests-to-join + :create-community-channel + :community-emoji-thumbnail-picker + :create-community-category + :community-edit-chats + :community-edit + :community-reorder-categories)) + +;; change view-id if it is still same after component is disappeared +;; https://github.com/wix/react-native-navigation/issues/5744#issuecomment-563226820 +(fx/defn view-disappeared + {:events [::view-disappeared]} + [{:keys [db]} view-id] + (when (= view-id (:view-id db)) + {:db (assoc db :view-id (cond + (= view-id :community-emoji-thumbnail-picker) + :create-community-channel + + (some #(= view-id %) community-screens) + :community + + :else + :home)) + :dispatch-n (enc/conj-when [] + (and (= view-id :chat) [:chat.ui/sync-all-deleted-for-me-messages]))})) diff --git a/src/status_im/ui/screens/profile/components/sheets.cljs b/src/status_im/ui/screens/profile/components/sheets.cljs index 2be57aaf25..3d09c4a341 100644 --- a/src/status_im/ui/screens/profile/components/sheets.cljs +++ b/src/status_im/ui/screens/profile/components/sheets.cljs @@ -12,7 +12,7 @@ in-progress? (reagent/atom false)] [react/view {:style {:padding-top 16 :padding-horizontal 24 :padding-bottom 8}} [react/text {:style styles/sheet-text} - (i18n/label :t/block-contact-details)] + (i18n/label :t/block-user-confirmation)] [react/view {:align-items :center :margin-top 16} [quo/button {:theme :negative :disabled @in-progress? diff --git a/src/status_im/ui2/screens/chat/actions.cljs b/src/status_im/ui2/screens/chat/actions.cljs index b94ad9152c..fee997983b 100644 --- a/src/status_im/ui2/screens/chat/actions.cljs +++ b/src/status_im/ui2/screens/chat/actions.cljs @@ -3,8 +3,9 @@ [status-im.chat.models :as chat.models] [status-im.chat.models.pin-message :as models.pin-message] [status-im.i18n.i18n :as i18n] - [status-im.constants :as constants] [status-im.utils.re-frame :as rf] + [status-im.ui2.screens.common.core :as common] + [status-im.constants :as constants] [quo2.components.drawers.action-drawers :as drawer])) (defn- entry [{:keys [icon label on-press danger? sub-label chevron?]}] @@ -40,14 +41,40 @@ (defn unmute-chat-action [chat-id] (hide-sheet-and-dispatch [::chat.models/mute-chat-toggled chat-id false])) -(defn clear-history-action [chat-id] - (hide-sheet-and-dispatch [:chat.ui/clear-history-pressed chat-id])) +(defn clear-history-action [{:keys [chat-id] :as item}] + (hide-sheet-and-dispatch [:bottom-sheet/show-sheet + {:content (fn [] + (common/alert {:title (i18n/label :t/clear-history?) + :description (i18n/label :t/clear-history-confirmation-content) + :context item + :button-text (i18n/label :t/clear-history) + :on-press #(hide-sheet-and-dispatch [:chat.ui/clear-history chat-id])}))}])) -(defn delete-chat-action [chat-id] - (hide-sheet-and-dispatch [:chat.ui/remove-chat-pressed chat-id])) +(defn delete-chat-action [{:keys [chat-id] :as item}] + (hide-sheet-and-dispatch [:bottom-sheet/show-sheet + {:content (fn [] + (common/alert {:title (i18n/label :t/delete-chat?) + :description (i18n/label :t/delete-chat-confirmation) + :context item + :button-text (i18n/label :t/delete-chat) + :on-press #(hide-sheet-and-dispatch [:chat.ui/remove-chat chat-id])}))}])) -(defn leave-group-action [chat-id] - (hide-sheet-and-dispatch [:group-chats.ui/leave-chat-pressed chat-id])) +(defn leave-group-action [{:keys [chat-id] :as item}] + (hide-sheet-and-dispatch [:bottom-sheet/show-sheet + {:content (fn [] + (common/alert {:title (i18n/label :t/leave-group?) + :description (i18n/label :t/leave-chat-confirmation) + :context item + :button-text (i18n/label :t/leave-group) + :on-press #(hide-sheet-and-dispatch [:chat.ui/leave-chat chat-id])}))}])) + +(defn block-user-action [{:keys [public-key] :as item}] + (hide-sheet-and-dispatch [:bottom-sheet/show-sheet + {:content (fn [] (common/alert {:title (i18n/label :t/block-user?) + :description (i18n/label :t/block-user-confirmation) + :context item + :button-text (i18n/label :t/block-user) + :on-press #(hide-sheet-and-dispatch [:contact.ui/block-contact-confirmed public-key])}))}])) (defn mute-chat-entry [chat-id] (let [muted? (rf/sub [:chats/muted chat-id])] @@ -79,18 +106,18 @@ :sub-label nil :chevron? false})) -(defn delete-chat-entry [chat-id] +(defn delete-chat-entry [item] (entry {:icon :i/delete :label (i18n/label :t/delete-chat) - :on-press #(delete-chat-action chat-id) + :on-press #(delete-chat-action item) :danger? true :sub-label nil :chevron? false})) -(defn leave-group-entry [chat-id] +(defn leave-group-entry [item] (entry {:icon :i/log-out :label (i18n/label :t/leave-group) - :on-press #(leave-group-action chat-id) + :on-press #(leave-group-action item) :danger? true :sub-label nil :chevron? false})) @@ -178,15 +205,15 @@ (defn mark-untrustworthy-entry [] (entry {:icon :i/alert :label (i18n/label :t/mark-untrustworthy) - :on-press #(js/alert "TODO: to be implemented, probably requires status-go impl. and design input") + :on-press #(js/alert "TODO: to be implemented, requires status-go impl.") :danger? true :sub-label nil :chevron? false})) -(defn block-user-entry [] +(defn block-user-entry [item] (entry {:icon :i/block :label (i18n/label :t/block-user) - :on-press #(js/alert "TODO: to be implemented, requires design input") + :on-press #(block-user-action item) :danger? true :sub-label nil :chevron? false})) @@ -231,11 +258,11 @@ :sub-label nil :chevron? false})) -(defn destructive-actions [chat-id group-chat] +(defn destructive-actions [{:keys [chat-id group-chat] :as item}] [(clear-history-entry chat-id) (if group-chat - (leave-group-entry chat-id) - (delete-chat-entry chat-id))]) + (leave-group-entry item) + (delete-chat-entry item))]) (defn notification-actions [{:keys [chat-id group-chat public?]} inside-chat?] [(mark-as-read-entry chat-id) @@ -262,23 +289,23 @@ (when (and admin? inside-chat?) (edit-group-entry)) (when (and admin? inside-chat?) (group-privacy-entry))])) -(defn one-to-one-actions [{:keys [chat-id group-chat] :as item} inside-chat?] +(defn one-to-one-actions [{:keys [chat-id] :as item} inside-chat?] [drawer/action-drawer [[(view-profile-entry chat-id) (edit-nickname-entry chat-id)] (notification-actions item inside-chat?) - (destructive-actions chat-id group-chat)]]) + (destructive-actions item)]]) -(defn public-chat-actions [{:keys [chat-id group-chat] :as item} inside-chat?] +(defn public-chat-actions [{:keys [chat-id] :as item} inside-chat?] [drawer/action-drawer [[(group-details-entry chat-id) (when inside-chat? (add-members-entry))] (notification-actions item inside-chat?) - (destructive-actions chat-id group-chat)]]) + (destructive-actions item)]]) -(defn private-group-chat-actions [{:keys [chat-id group-chat] :as item} inside-chat?] +(defn private-group-chat-actions [item inside-chat?] [drawer/action-drawer [(group-actions item inside-chat?) (notification-actions item inside-chat?) - (destructive-actions chat-id group-chat)]]) + (destructive-actions item)]]) (defn contact-actions [{:keys [public-key] :as contact}] [drawer/action-drawer [[(view-profile-entry public-key) @@ -287,7 +314,7 @@ (show-qr-entry) (share-profile-entry)] [(mark-untrustworthy-entry) - (block-user-entry)]]]) + (block-user-entry contact)]]]) (defn actions [{:keys [chat-type] :as item} inside-chat?] (case chat-type diff --git a/src/status_im/ui2/screens/chat/components/message_home_item/view.cljs b/src/status_im/ui2/screens/chat/components/message_home_item/view.cljs index 19fb5244cc..636a1665e9 100644 --- a/src/status_im/ui2/screens/chat/components/message_home_item/view.cljs +++ b/src/status_im/ui2/screens/chat/components/message_home_item/view.cljs @@ -5,7 +5,6 @@ [quo2.foundations.typography :as typography] [quo2.components.icon :as icons] [quo2.foundations.colors :as colors] - [quo2.components.avatars.user-avatar :as user-avatar] [quo.react-native :as rn] [quo.platform :as platform] [quo2.core :as quo2] @@ -90,14 +89,11 @@ (defn display-pic-view [group-chat color display-name photo-path] (if group-chat - [rn/view {:style (style/group-chat-icon color)} - [icons/icon :i/group {:size 16 :color colors/white-opa-70}]] - [user-avatar/user-avatar {:full-name display-name - :profile-picture photo-path - :status-indicator? true - :online? true - :size :small - :ring? false}])) + [quo2/group-avatar {:color color + :size :medium}] + [quo2/user-avatar {:full-name display-name + :profile-picture photo-path + :size :small}])) (defn messages-home-item [item] (let [{:keys [chat-id diff --git a/src/status_im/ui2/screens/chat/home.cljs b/src/status_im/ui2/screens/chat/home.cljs index fd65f3b5eb..a21eccf06a 100644 --- a/src/status_im/ui2/screens/chat/home.cljs +++ b/src/status_im/ui2/screens/chat/home.cljs @@ -249,6 +249,7 @@ contacts (prepare-contacts contacts) notifications (