parent
a441156ff9
commit
0503f5cfc9
|
@ -126,6 +126,11 @@
|
||||||
(when (string? s)
|
(when (string? s)
|
||||||
(string/replace s m r)))
|
(string/replace s m r)))
|
||||||
|
|
||||||
|
(defn safe-nth
|
||||||
|
[coll index]
|
||||||
|
(when (number? index)
|
||||||
|
(nth coll index)))
|
||||||
|
|
||||||
(defn svg?
|
(defn svg?
|
||||||
[some-string]
|
[some-string]
|
||||||
(string/ends-with? some-string ".svg"))
|
(string/ends-with? some-string ".svg"))
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
;; The initial value of data is the image that was pressed (and not the whole album) in order
|
;; The initial value of data is the image that was pressed (and not the whole album) in order
|
||||||
;; for the transition animation to execute properly, otherwise it would animate towards
|
;; for the transition animation to execute properly, otherwise it would animate towards
|
||||||
;; outside the screen (even if we have `initialScrollIndex` set).
|
;; outside the screen (even if we have `initialScrollIndex` set).
|
||||||
data (reagent/atom [(nth messages index)])
|
data (reagent/atom (if (number? index) [(nth messages index)] []))
|
||||||
scroll-index (reagent/atom index)
|
scroll-index (reagent/atom index)
|
||||||
transparent? (reagent/atom false)
|
transparent? (reagent/atom false)
|
||||||
set-full-height? (reagent/atom false)
|
set-full-height? (reagent/atom false)
|
||||||
|
|
Loading…
Reference in New Issue