parent
a441156ff9
commit
0503f5cfc9
|
@ -126,6 +126,11 @@
|
|||
(when (string? s)
|
||||
(string/replace s m r)))
|
||||
|
||||
(defn safe-nth
|
||||
[coll index]
|
||||
(when (number? index)
|
||||
(nth coll index)))
|
||||
|
||||
(defn svg?
|
||||
[some-string]
|
||||
(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
|
||||
;; for the transition animation to execute properly, otherwise it would animate towards
|
||||
;; 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)
|
||||
transparent? (reagent/atom false)
|
||||
set-full-height? (reagent/atom false)
|
||||
|
|
Loading…
Reference in New Issue