Skip to content

Commit

Permalink
🐛 Fix problem when dismissing shared library update
Browse files Browse the repository at this point in the history
  • Loading branch information
Alotor committed Sep 6, 2024
1 parent 886c0c5 commit 03040ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
- Fix problem with overlay positions in viewer [Taiga #8464](https://tree.taiga.io/project/penpot/issue/8464)
- Fix layer panel overflowing [Taiga #8665](https://tree.taiga.io/project/penpot/issue/8665)
- Fix problem when creating a component instance from grid layout [Github #4881](https://github.com/penpot/penpot/issues/4881)
- Fix problem when dismissing shared library update [Taiga #8669](https://tree.taiga.io/project/penpot/issue/8669)

## 2.1.5

Expand Down
2 changes: 1 addition & 1 deletion backend/src/app/rpc/commands/files.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@
(def ^:private schema:ignore-file-library-sync-status
[:map {:title "ignore-file-library-sync-status"}
[:file-id ::sm/uuid]
[:date ::dt/duration]])
[:date ::dt/instant]])

;; TODO: improve naming
(sv/defmethod ::ignore-file-library-sync-status
Expand Down
15 changes: 8 additions & 7 deletions backend/src/app/util/time.clj
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,22 @@

;; --- INSTANT

(defn instant?
[v]
(instance? Instant v))

(defn instant
([s]
(if (int? s)
(Instant/ofEpochMilli s)
(Instant/parse s)))
(cond
(instant? s) s
(int? s) (Instant/ofEpochMilli s)
:else (Instant/parse s)))
([s fmt]
(case fmt
:rfc1123 (Instant/from (.parse DateTimeFormatter/RFC_1123_DATE_TIME ^String s))
:iso (Instant/from (.parse DateTimeFormatter/ISO_INSTANT ^String s))
:iso8601 (Instant/from (.parse DateTimeFormatter/ISO_INSTANT ^String s)))))

(defn instant?
[v]
(instance? Instant v))

(defn is-after?
[da db]
(.isAfter ^Instant da ^Instant db))
Expand Down

0 comments on commit 03040ed

Please sign in to comment.