[#8937] Recent stickers are shown when stickers tab is highlighted
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
7a642c76de
commit
284f9bffed
|
@ -64,12 +64,16 @@
|
||||||
|
|
||||||
(defn update-scroll-position [ref installed-packs selected-pack window-width]
|
(defn update-scroll-position [ref installed-packs selected-pack window-width]
|
||||||
(when ref
|
(when ref
|
||||||
(let [x (if (= selected-pack :recent)
|
;; bug on Android https://github.com/facebook/react-native/issues/24531
|
||||||
0
|
(js/setTimeout
|
||||||
(* (inc (some #(when (= selected-pack (:id (second %))) (first %))
|
(fn []
|
||||||
(map-indexed vector installed-packs)))
|
(let [x (if (= selected-pack :recent)
|
||||||
window-width))]
|
0
|
||||||
(.scrollTo ref (clj->js {:x x :animated true})))))
|
(* (inc (some #(when (= selected-pack (:id (second %))) (first %))
|
||||||
|
(map-indexed vector installed-packs)))
|
||||||
|
window-width))]
|
||||||
|
(.scrollTo ref #js {:x x :animated true})))
|
||||||
|
200)))
|
||||||
|
|
||||||
(defn on-scroll [e installed-packs window-width]
|
(defn on-scroll [e installed-packs window-width]
|
||||||
(let [num (/ (.-nativeEvent.contentOffset.x e) window-width)
|
(let [num (/ (.-nativeEvent.contentOffset.x e) window-width)
|
||||||
|
|
Loading…
Reference in New Issue