Skip to content

Commit

Permalink
use image-with-loader in sticker picker
Browse files Browse the repository at this point in the history
  • Loading branch information
msuess committed Jan 12, 2022
1 parent d2b6c72 commit ac3a36e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/status_im/ui/screens/chat/stickers/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
[quo.core :as quo]
[status-im.ui.screens.chat.stickers.styles :as styles]
[status-im.utils.contenthash :as contenthash]
[status-im.utils.debounce :as debounce]))
[status-im.utils.debounce :as debounce]
[status-im.ui.components.image-with-loader :refer [image-with-loader]]))

(def icon-size 28)
(def icon-horizontal-margin 8)
Expand Down Expand Up @@ -39,9 +40,9 @@
^{:key (str hash)}
[react/touchable-highlight {:style {:height 75 :width 75 :margin 5}
:on-press #(debounce/dispatch-and-chill [:chat/send-sticker sticker] 1000)}
[react/fast-image {:style {:width "100%" :height "100%"}
:accessibility-label :sticker-icon
:source {:uri (contenthash/url (str "0x" hash))}}]])]]])
[image-with-loader {:style {:width "100%" :height "100%" :border-radius 8}
:accessibility-label :sticker-icon
:source {:uri (contenthash/url (str "0x" hash))}}]])]]])

(defview recent-stickers-panel [window-width]
(letsubs [stickers [:stickers/recent]]
Expand Down Expand Up @@ -143,6 +144,6 @@
^{:key id}
[pack-icon {:id id
:background-color colors/white}
[react/fast-image {:style {:width icon-size :height icon-size :border-radius (/ icon-size 2)}
:source {:uri (contenthash/url thumbnail)}}]])]
[image-with-loader {:style {:width icon-size :height icon-size :border-radius (/ icon-size 2)}
:source {:uri (contenthash/url thumbnail)}}]])]
[scroll-indicator]]]]]))

0 comments on commit ac3a36e

Please sign in to comment.