mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 10:56:12 +02:00
🐛 Fix invalid files amount after moving on dashboard
This commit is contained in:
parent
2e549b164f
commit
acccba6ed4
2 changed files with 8 additions and 0 deletions
|
@ -925,6 +925,13 @@
|
|||
{:num-files (count ids)
|
||||
:project-id project-id})
|
||||
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [origin-project (get-in state [:dashboard-files (first ids) :project-id])]
|
||||
(-> state
|
||||
(update-in [:dashboard-projects origin-project :count] #(- % (count ids)))
|
||||
(update-in [:dashboard-projects project-id :count] #(+ % (count ids))))))
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(let [{:keys [on-success on-error]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue