Skip to content

Commit 5dce30d

Browse files
authored
Merge branch 'develop' into share-community-qr-17993
2 parents eebdfe2 + dc53bdd commit 5dce30d

File tree

6 files changed

+20
-17
lines changed

6 files changed

+20
-17
lines changed

src/status_im/common/bottom_sheet_screen/view.cljs

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
(def ^:const drag-threshold 200)
1616

1717
(defn drag-gesture
18-
[{:keys [translate-y opacity scroll-enabled curr-scroll close reset-open-sheet set-animating-true]}]
18+
[{:keys [translate-y opacity scroll-enabled? curr-scroll close reset-open-sheet set-animating-true]}]
1919
(-> (gesture/gesture-pan)
2020
(gesture/on-start (fn [e]
2121
(set-animating-true)
2222
(when (< (oops/oget e "velocityY") 0)
23-
(reset! scroll-enabled true))))
23+
(reset! scroll-enabled? true))))
2424
(gesture/on-update (fn [e]
2525
(let [translation (oops/oget e "translationY")
2626
progress (Math/abs (/ translation drag-threshold))]
@@ -34,7 +34,7 @@
3434
(gesture/on-finalize (fn [e]
3535
(when (and (>= (oops/oget e "velocityY") 0)
3636
(<= @curr-scroll (if platform/ios? -1 0)))
37-
(reset! scroll-enabled false))))))
37+
(reset! scroll-enabled? false))))))
3838

3939
(defn on-scroll
4040
[e curr-scroll]
@@ -43,7 +43,7 @@
4343

4444
(defn- f-view
4545
[_]
46-
(let [scroll-enabled (reagent/atom true)
46+
(let [scroll-enabled? (reagent/atom true)
4747
curr-scroll (reagent/atom 0)
4848
animating? (reagent/atom true)
4949
set-animating-true #(reset! animating? true)
@@ -63,7 +63,7 @@
6363
(reanimated/animate translate-y 0 300)
6464
(reanimated/animate opacity 1 300)
6565
(set-animating-false 300)
66-
(reset! scroll-enabled true))]
66+
(reset! scroll-enabled? true))]
6767
(rn/use-effect
6868
(fn []
6969
(reanimated/animate translate-y 0 300)
@@ -76,7 +76,7 @@
7676
[gesture/gesture-detector
7777
{:gesture (drag-gesture {:translate-y translate-y
7878
:opacity opacity
79-
:scroll-enabled scroll-enabled
79+
:scroll-enabled? scroll-enabled?
8080
:curr-scroll curr-scroll
8181
:close close
8282
:reset-open-sheet reset-open-sheet
@@ -87,7 +87,7 @@
8787
[content
8888
{:insets insets
8989
:close close
90-
:scroll-enabled scroll-enabled
90+
:scroll-enabled? @scroll-enabled?
9191
:current-scroll curr-scroll
9292
:on-scroll #(on-scroll % curr-scroll)
9393
:sheet-animating? animating?}]]]]))))

src/status_im/common/emoji_picker/view.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@
9494
:container-style style/empty-results}])
9595

9696
(defn- render-list
97-
[{:keys [theme filtered-data on-viewable-items-changed scroll-enabled on-scroll
97+
[{:keys [theme filtered-data on-viewable-items-changed scroll-enabled? on-scroll
9898
on-select set-scroll-ref close sheet-animating?]}]
9999
[gesture/flat-list
100100
{:ref set-scroll-ref
101-
:scroll-enabled @scroll-enabled
101+
:scroll-enabled scroll-enabled?
102102
:data (or filtered-data emoji-picker.data/flatten-data)
103103
:initial-num-to-render 14
104104
:max-to-render-per-batch 10

src/status_im/contexts/chat/home/new_chat/view.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
item])))
6666

6767
(defn- view-internal
68-
[{:keys [scroll-enabled on-scroll close theme]}]
68+
[{:keys [scroll-enabled? on-scroll close theme]}]
6969
(let [contacts (rf/sub [:contacts/sorted-and-grouped-by-first-letter])
7070
selected-contacts-count (rf/sub [:selected-contacts-count])
7171
selected-contacts (rf/sub [:group/selected-contacts])
@@ -105,7 +105,7 @@
105105
:render-section-header-fn contact-list/contacts-section-header
106106
:content-container-style {:padding-bottom 70}
107107
:render-fn contact-item-render
108-
:scroll-enabled @scroll-enabled
108+
:scroll-enabled scroll-enabled?
109109
:on-scroll on-scroll}])
110110
(when contacts-selected?
111111
[quo/button

src/status_im/contexts/chat/messenger/photo_selector/album_selector/view.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
(str (:title item) index))
6262

6363
(defn- f-album-selector
64-
[{:keys [scroll-enabled on-scroll]} album? selected-album top]
64+
[{:keys [scroll-enabled? on-scroll]} album? selected-album top]
6565
(let [albums (rf/sub [:camera-roll/albums])
6666
total-photos-count-android (rf/sub [:camera-roll/total-photos-count-android])
6767
total-photos-count-ios (rf/sub [:camera-roll/total-photos-count-ios])
@@ -87,7 +87,7 @@
8787
:content-container-style {:padding-top 64
8888
:padding-bottom 40}
8989
:key-fn key-fn
90-
:scroll-enabled @scroll-enabled
90+
:scroll-enabled scroll-enabled?
9191
:on-scroll on-scroll
9292
:style {:height window-height}}]]))
9393

src/status_im/contexts/chat/messenger/photo_selector/view.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
(inc (utils.collection/first-index #(= (:uri item) (:uri %)) @selected))]])]))
9191

9292
(defn photo-selector
93-
[{:keys [scroll-enabled on-scroll current-scroll close] :as sheet}]
93+
[{:keys [scroll-enabled? on-scroll current-scroll close] :as sheet}]
9494
(rf/dispatch [:photo-selector/get-photos-for-selected-album])
9595
(rf/dispatch [:photo-selector/camera-roll-get-albums])
9696
(let [album? (reagent/atom false)
@@ -134,7 +134,7 @@
134134
:padding-bottom (+ (safe-area/get-bottom) 100)
135135
:padding-top 64}
136136
:on-scroll on-scroll
137-
:scroll-enabled @scroll-enabled
137+
:scroll-enabled scroll-enabled?
138138
:on-end-reached (fn []
139139
(when (and (not loading?) has-next-page?)
140140
(rf/dispatch [:photo-selector/camera-roll-loading-more true])

src/status_im/contexts/communities/actions/addresses_for_permissions/view.cljs

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
(:require [quo.core :as quo]
33
[quo.foundations.colors :as colors]
44
[react-native.core :as rn]
5+
[react-native.gesture :as gesture]
56
[status-im.common.not-implemented :as not-implemented]
67
[status-im.common.resources :as resources]
78
[status-im.constants :as constants]
@@ -45,7 +46,7 @@
4546
:container-style {:margin-bottom 8}}]))
4647

4748
(defn view
48-
[]
49+
[{:keys [scroll-enabled? on-scroll]}]
4950
(let [{id :community-id} (rf/sub [:get-screen-params])]
5051
(rf/dispatch [:communities/get-permissioned-balances id])
5152
(fn []
@@ -67,10 +68,12 @@
6768
:community-logo (get-in images [:thumbnail :uri])
6869
:customization-color color}]
6970

70-
[rn/flat-list
71+
[gesture/flat-list
7172
{:render-fn account-item
7273
:render-data [selected-addresses id]
7374
:content-container-style {:padding 20}
75+
:scroll-enabled scroll-enabled?
76+
:on-scroll on-scroll
7477
:key-fn :address
7578
:data accounts}]
7679

0 commit comments

Comments
 (0)