0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 16:30:37 -05:00

🐛 Fix font loading on viewer app.

This commit is contained in:
Andrey Antukh 2021-06-04 13:33:50 +02:00 committed by Alonso Torres
parent 8c68e29bf3
commit 8a700170b0
2 changed files with 11 additions and 2 deletions

View file

@ -50,9 +50,14 @@
libs (files/retrieve-file-libraries conn false file-id)
users (teams/retrieve-users conn (:team-id project))
fonts (db/query conn :team-font-variant
{:team-id (:team-id project)
:deleted-at nil})
bundle {:file file
:page page
:users users
:fonts fonts
:project project
:libraries libs}]

View file

@ -12,9 +12,10 @@
[app.common.spec :as us]
[app.common.uuid :as uuid]
[app.main.constants :as c]
[app.main.data.comments :as dcm]
[app.main.data.fonts :as df]
[app.main.repo :as rp]
[app.main.store :as st]
[app.main.data.comments :as dcm]
[app.util.avatars :as avatars]
[app.util.router :as rt]
[beicon.core :as rx]
@ -97,7 +98,10 @@
:file-id file-id}
(string? token) (assoc :token token))]
(->> (rp/query :viewer-bundle params)
(rx/map bundle-fetched))))))
(rx/mapcat
(fn [{:keys [fonts] :as bundle}]
(rx/of (df/fonts-fetched fonts)
(bundle-fetched bundle)))))))))
(defn- extract-frames
[objects]