New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#14245] Fix read/unread notifications filter #14333
Conversation
Jenkins BuildsClick to see older builds (12)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call to use a different endpoint wakuext_activityCenterNotificationsBy
.
[rn/view {:style {:width 300, :height 100}} | ||
[rn/text | ||
(gstring/format | ||
"I exist just to avoid crashing for no reason. I'm sorry. Type %d" type)]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need to tell Clojure devs that defmulti
requires a default case, just like case
, otherwise an exception is thrown if no match is found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just to emphasise without checking the code that this should be removed asap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was funny to read it 😄 I just try to avoid comments explaining how something in the language works, so that's why I bothered you with this.
@@ -25,6 +26,14 @@ | |||
|
|||
(defmulti notification-component :type) | |||
|
|||
;; TODO(rasom): should be removed as soon as all notifications types covered | |||
(defmethod notification-component :default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: Although I wrote the solution with a multimethod, it'll die soon. In the branch I'm working on right now I had to split different notifications into different files for two reasons: code conflicts because we're touching the same file... and second and most important, because the identity verification notification has to be rendered also in a bottom sheet.
(if (= filter-status :read) | ||
"wakuext_readActivityCenterNotifications" | ||
"wakuext_unreadActivityCenterNotifications")) | ||
(def ^:const status-read 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a doc reference as to why we should tell the compiler these things are constants? Does it bring any meaningful performance improvement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it bring any meaningful performance improvement?
it doesn't
532aa0a
to
a7fe653
Compare
a7fe653
to
4353c4a
Compare
fix #14245
status: ready